Ticket #8625 (new defect)
BUG: recode from utf8 fails (sometimes silently, corrupting the file)
| Reported by: | vincent-opdarw@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.0 |
| Keywords: | Cc: | ||
| Port: | recode |
Description (last modified by toby@…) (diff)
With LC_CTYPE="en_US.ISO8859-1", I have the following problem. I don't know if this is an upstream bug or not, but this doesn't fail under Linux (with the same locales):
$ recode utf8.. < /dev/null recode: System detected problem in step `UTF-8..CHAR'
Attachments
Change History
comment:1 Changed 7 years ago by vincent-opdarw@…
- severity changed from normal to critical
- Summary changed from BUG: recode utf8.. fails to BUG: recode from utf8 fails (sometimes silently, corrupting the file)
Changed 7 years ago by vincent-opdarw@…
- Attachment file.latin1.orig added
Test case showing a silent file corruption
comment:2 Changed 7 years ago by vincent-opdarw@…
(In reply to comment #1)
After some tests, the problem seems to occur near position 4096. Incorrect buffering?
In fact, near position 2048 too, as shown on the test case.
comment:6 Changed 4 years ago by toby@…
- Description modified (diff)
Since this is a long-standing bug in a port with no upstream maintainer, perhaps a good candidate for the 'notes' feature in 1.8
Note: See
TracTickets for help on using
tickets.


Sometimes recode silently fails, producing incorrect data in the middle of a file. This is a serious bug, in particular when doing in-place recoding (i.e. when using a file argument), as the file gets corrupted, with missing data. After some tests, the problem seems to occur near position 4096. Incorrect buffering?
I'm going to attach a test case with such a silent file corruption.
Note: again, this bug doesn't occur under Linux (Debian).