A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-June/119908.html below:

[Python-Dev] Issue #11022: locale.getpreferredencoding() must not set temporary LC_CTYPE

[Python-Dev] Issue #11022: locale.getpreferredencoding() must not set temporary LC_CTYPE [Python-Dev] Issue #11022: locale.getpreferredencoding() must not set temporary LC_CTYPEVictor Stinner victor.stinner at gmail.com
Tue Jun 5 13:55:20 CEST 2012
> Fine with me.

Ok, done with changeset 2587328c7c9c.

> So in theory, your change should have no effect, unless somebody has
> modified some environment variables.

Changing TextIOWrapper to call locale.getpreferredlocale(False)
instead of getpreferredlocale() has these two effects:

1) without the patch, setting LC_ALL, LC_CTYPE or LANG environment
variable changes the encoding used by TextIOWrapper.

2) with the patch, setting LC_CTYPE (with locale.setlocale) changes
the the encoding used by TextIOWrapper.

IMO (2) is less surprising than (1) For example, it is the expected
behaviour of the reporter of the issue #11022.

In practice, it should not change anything for most people.

Victor
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