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/2017-June/148320.html below:

[Python-Dev] PEP 538 (review round 2): Coercing the legacy C locale to a UTF-8 based locale

[Python-Dev] PEP 538 (review round 2): Coercing the legacy C locale to a UTF-8 based locale [Python-Dev] PEP 538 (review round 2): Coercing the legacy C locale to a UTF-8 based localeMartin (gzlist) gzlist at googlemail.com
Mon Jun 12 03:47:07 EDT 2017
Thanks for replying to my points!

On 12/06/2017, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> `PYTHONIOENCODING=:strict` remains the preferred way of forcing strict
> encoding checks on the standard streams, regardless of locale.

Then the user of my script has to care that it's written in Python and
set that specifically in their crontab or so on...

> In addition to providing a reliable escape hatch with no other
> potentially unwanted side effects (for when folks actually want the
> current behaviour), the entry for the off switch in the CLI usage docs
> also provides us with a convenient place to document the *default*
> behaviour.

The documentation aspect is an interesting consideration.

Having thought about it a bit more, my preferred option is having the
disable be if either LC_ALL or LC_CTYPE vars are exactly 'C', then
don't override. Otherwise (including for LANG=C), force C.UTF-8. The
CLI usage docs could have a LC_CTYPE entry that goes into details of
why.

Martin
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