[Csv] Something's fishy w/ Mac line endings...

Andrew McNamara andrewm at object-craft.com.au
Mon Aug 18 06:20:33 CEST 2003


>    Andrew> I wonder if it's a unicode issue?
>
>Shouldn't be.  The test case the submitter posted only uses ASCII.

However, OS-X deals with unicode natively - the standard terminal window
interprets UTF-8 correctly, and, presumably, can also generate it as input
to a character mode application...

>readahead_get_line_skip notes the presence of \n and NUL terminates the line
>it returns, but not the presense of \r.
>
>I see one of two possible solutions:
>
>    1. See if readahead_get_line_skip should special-case \r when not
>       followed by \n.  I think this may be the "most correct" approach.

I can't remember - is the EOL character a property of the Reader?

We need to do a more comprehensive update for Unicode (while making the
string handling 8 bit clean), but the most expedient fix is appropriate
for Python 2.3.1.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


More information about the Csv mailing list