[Python-ideas] RFC: PEP 540 version 3 (Add a new UTF-8 mode)

Random832 random832 at fastmail.com
Thu Jan 12 13:04:43 EST 2017


On Thu, Jan 12, 2017, at 12:10, Victor Stinner wrote:
> 2017-01-12 17:10 GMT+01:00 Oleg Broytman <phd at phdru.name>:
> >> Does it work to use a locale with encoding A for LC_CTYPE and a locale
> >> with encoding B for LC_MESSAGES (and others)? Is there a risk of
> >
> >    It does when B is a subset of A (ascii and koi8; ascii and utf8, e.g.)
> 
> My question is more when A and B encodings are not compatible.
> 
> Ah yes, date, thank you for the example. Here is my example using
> LC_TIME locale to format a date and LC_CTYPE to decode a byte string:

Time and messages seem to behave differently - everything I tested
(including python 2 os.strerror) seems to ignore the LC_MESSAGES
encoding and use the LC_CTYPE encoding, including resulting in a bunch
of question marks when it's "C".


More information about the Python-ideas mailing list