[Python-Dev] just say no...
Guido van Rossum
guido@CNRI.Reston.VA.US
Tue, 16 Nov 1999 09:43:07 -0500
> FYI, the next version of the proposal now says "s#" gives you
> UTF-16 and "t#" returns UTF-8. File objects opened in text mode
> will use "t#" and binary ones use "s#".
Good.
> I'll just use explicit u.encode('utf-8') calls if I want to write
> UTF-8 to binary files -- perhaps everyone else should too ;-)
You could write UTF-8 to files opened in text mode too; at least most
actual systems will leave the UTF-8 escapes alone and just to LF ->
CRLF translation, which should be fine.
--Guido van Rossum (home page: http://www.python.org/~guido/)