[Development] RFC: Defaulting to or enforcing UTF-8 locales on Unix systems

Edward Welbourne edward.welbourne at qt.io
Fri Nov 1 19:01:27 CET 2019


Lars Knoll (1 November 2019 10:21)
> Thanks for the comprehensive mail.

Seconded :-)

By effectively joining forces with Python to deprecate ASCII in favour
of UTF-8, perhaps we can even put some pressure on POSIX to board the
Unicode train.

> For your bonus (d) below, I’d say we should print a warning if we
> encounter a non UTF-8 locale other than C.

On 31 Oct 2019, at 22:11, Thiago Macieira <thiago.macieira at intel.com> wrote:
>> Bonus d) should we print a warning when we've made a change?
>>
>> Options are:
>> - yes, for all of them
>> - yes, but only for locales other than "C"
>> - no

I note that [PEP 538] says (on the "C is C-UTF8" part of the subject
matter), under Implementation Notes:

  Attempting to implement the PEP as originally accepted showed that the
  proposal to emit locale coercion and compatibility warnings by default
  simply wasn't practical (there were too many cases where previously
  working code failed because of the warnings, rather than because of
  latent locale handling defects in the affected code).

* [PEP 538] https://www.python.org/dev/peps/pep-0538/

So I cast another vote for
>> - yes, but only for locales other than "C"

	Eddy.


More information about the Development mailing list