A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-January/085611.html below:

[Python-Dev] Python 3.0.1 (io-in-c)

[Python-Dev] Python 3.0.1 (io-in-c) [Python-Dev] Python 3.0.1 (io-in-c)Paul Moore p.f.moore at gmail.com
Wed Jan 28 19:17:16 CET 2009
2009/1/28 "Martin v. Löwis" <martin at v.loewis.de>:
> 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.

Thanks for the explanation. It might be clearer to document this a
little more explicitly in the docs for open() (on the basis that
people using open() are the most likely to be naive about encodings).
I'll see if I can come up with an appropriate doc patch.

Paul.
More information about the Python-Dev mailing list

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