On Thu, Jan 12, 2017 at 01:04:43PM -0500, Random832 <[email protected]> 
wrote:
> On Thu, Jan 12, 2017, at 12:10, Victor Stinner wrote:
> > 2017-01-12 17:10 GMT+01:00 Oleg Broytman <[email protected]>:
> > >> 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".

   Works for me as expected:

$ echo $LC_CTYPE
ru_RU.KOI8-R

$ LC_MESSAGES=ru_RU.KOI8-R mc

   mc speaks to me in Russian...

$ LC_MESSAGES=C mc

   ...English.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            [email protected]
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to