[Python-Dev] Next version of PEP278 - universal newline support - available

Martin v. Loewis martin@v.loewis.de
14 Mar 2002 08:36:48 +0100


Paul Prescod <paul@prescod.net> writes:

> >     f = textfile(filename, mode="r", encoding=None)
> 
> Enthusiastic +1.
> 
> But I think that encoding should default to "ASCII". We also need to
> discuss under what circumstances textfile("foo").read() returns Unicode
> string versus 8-bit string.

My suggestion would be "always", while I'm fine with the default
encoding as "ascii".

"Universal" newline support then means that additional newline markers
should be recognized: 
U+0080 NEXT LINE (NEL)
U+2028 LINE SEPARATOR

If possible, Unicode TR 13 (http://www.unicode.org/unicode/reports/tr13/)
should be followed as much as possible.

Regards,
Martin