Opened 18 years ago

Last modified 10 years ago

#8625 closed defect

BUG: recode from utf8 fails (sometimes silently, corrupting the file) — at Version 6

Reported by: vincent-opdarw@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port: recode

Description (last modified by tobypeterson)

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'

Change History (7)

comment:1 Changed 18 years ago by vincent-opdarw@…

severity: normalcritical
Summary: BUG: recode utf8.. failsBUG: recode from utf8 fails (sometimes silently, corrupting the file)

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).

Changed 18 years ago by vincent-opdarw@…

Attachment: file.latin1.orig added

Test case showing a silent file corruption

comment:2 Changed 18 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:3 Changed 18 years ago by pipping@…

Milestone: Available Ports

comment:4 Changed 18 years ago by pipping@…

Milestone: Available PortsPort Bugs

comment:5 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:6 Changed 15 years ago by tobypeterson

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.