A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/python/peps/commit/71cda51fbb622ece63f7a9d3c8fa6cd33ce06b58 below:

Fix effects of the PEP 538 · python/peps@71cda51 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+9

-3

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+9

-3

lines changed Original file line number Diff line number Diff line change

@@ -144,9 +144,15 @@ The POSIX locale enables the locale coercion (PEP 538) and the UTF-8

144 144

mode (PEP 540). When the locale coercion is enabled, enabling the UTF-8

145 145

mode has no (additional) effect.

146 146 147 -

Locale coercion only impacts non-Python code like C libraries, whereas

148 -

the Python UTF-8 Mode only impacts Python code: the two PEPs are

149 -

complementary.

147 +

The UTF-8 has the same effect than locale coercion:

148 +

``sys.getfilesystemencoding()`` returns ``'UTF-8'``,

149 +

``locale.getpreferredencoding()`` returns ``UTF-8``, ``sys.stdin`` and

150 +

``sys.stdout`` error handler set to ``surrogateescape``. These changes

151 +

only affect Python code. But the locale coercion has addiditonal

152 +

effects: the ``LC_CTYPE`` environment variable and the ``LC_CTYPE``

153 +

locale are set to a UTF-8 locale like ``C.UTF-8``. The side effect is

154 +

that non-Python code is also impacted by the locale coercion. The two

155 +

PEPs are complementary.

150 156 151 157

On platforms where locale coercion is not supported like Centos 7, the

152 158

POSIX locale only enables the UTF-8 Mode. In this case, Python code uses

You can’t perform that action at this time.


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