unknown locale de_DE at euro
Martin v. Loewis
martin at v.loewis.de
Mon May 13 02:21:55 EDT 2002
vincent wehren <vincent at visualtrans.de> writes:
> "To get the encoding" pretty much sums it up. I manage the translation
> center of a vendor of industry-specific ERP systems. Now, apart from the
> translation effort, a lot of my focus is on issues such as encodings, code
> pages, and so on. I therefore often use a python script to "spy" the
> default encoding as well as the keyboard layout of the os - for info
> purposes
I see. For that, I really recommend to use nl_langinfo(CODESET): this
will be able to determine that de_DE at euro uses ISO-8859-15, which
getdefaultlocale cannot possibly determine.
I was hoping that you would answer something like "to print text in
that encoding to a terminal", for which I would propose the addition
of a function locale.terminal_encoding(). Alas, "for info purposes"
probably could use the same function if it were available.
Thanks,
Martin
More information about the Python-list
mailing list