[Python-Dev] Python 3.0.1 (io-in-c) (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Wed Jan 28 18:59:33 CET 2009
- Previous message: [Python-Dev] Python 3.0.1 (io-in-c)
- Next message: [Python-Dev] Python 3.0.1 (io-in-c)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Paul Moore wrote:
Hmm, I just checked and on Windows, it appears that sys.getdefaultencoding() is UTF-8. That seems odd - I would have thought the majority of Windows systems were NOT set to use UTF-8 by default...
In Python 3, sys.getdefaultencoding() is "utf-8" on all platforms, just as it was "ascii" in 2.x, on all platforms. The default encoding isn't used for I/O; check f.encoding to find out what encoding is used to read the file you are reading.
Regards, Martin
- Previous message: [Python-Dev] Python 3.0.1 (io-in-c)
- Next message: [Python-Dev] Python 3.0.1 (io-in-c)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]