Message5224

Author artichoke
Recipients artichoke
Date 2009-10-08.05:07:48
SpamBayes Score 2.76224e-09
Marked as misclassified No
Message-id <1254978473.97.0.653702310028.issue1487@psf.upfronthosting.co.za>
In-reply-to
Content
Where default file encoding is utf-8, "import tarfile" fails with
MalformedInputException because of the a with diaeresis in that file.

It can be fixed by using an 8-bit compatible encoding while looking for
the coding: comment.  Changing line 79 to read:

        BufferedReader br = new BufferedReader(new
InputStreamReader(stream, "ISO-8859-1"), 512);

fixes the problem.

sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:278)
        at
sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:316)
        at
sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:366)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:252)
        at java.io.InputStreamReader.read(InputStreamReader.java:212)
        at java.io.BufferedReader.fill(BufferedReader.java:157)
        at java.io.BufferedReader.readLine(BufferedReader.java:320)
        at java.io.BufferedReader.readLine(BufferedReader.java:383)
        at org.python.core.ParserFacade.findEncoding(ParserFacade.java:411)
        at org.python.core.ParserFacade.readEncoding(ParserFacade.java:391)
        at org.python.core.ParserFacade.prepBufReader(ParserFacade.java:301)
History
Date User Action Args
2009-10-08 05:07:55artichokesetrecipients: + artichoke
2009-10-08 05:07:54artichokesetmessageid: <1254978473.97.0.653702310028.issue1487@psf.upfronthosting.co.za>
2009-10-08 05:07:52artichokelinkissue1487 messages
2009-10-08 05:07:49artichokecreate