>>
>> 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".
> _______________________________________________

For date command, it only sees LC_TIME.
LC_CTYPE=en_US.UTF-8 LC_TIME=ja_JP.eucjp date shows mojibake.

But it's not a problem, because changing LC_CTYPE from C to C.UTF-8
doesn't break anything.  It's broken at start.
Use UTF-8 everywhere, anytime is best way to avoid mojibake.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to