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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4