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

Skip Montanaro skip at pobox.com
Mon Aug 18 17:32:45 CEST 2003


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

It's a property of the dialect object.  Currently, I don't think we restrict
the lineterminator attribute, so it would probably be valid for it to be
":", \b or '47'.

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

Unfortunately, I think the correct fix is to not require a NUL following
every \r or \n character encountered.  I think that places the ball in your
court for the moment.  Can you evaluate how hard that would be?

I note that ReaderObj does contain a dialect field, so you do have access to
the lineterminator while reading the file.

Skip


More information about the Csv mailing list