Erronous "unsupported locale setting" ?
robert
no-spam at no-spam-no-spam.invalid
Mon Nov 6 09:18:29 EST 2006
Leo Kislov wrote:
> robert wrote:
>> Why can the default locale not be set by its true name? but only by '' ? :
>
> Probably it is just not implemented. But since locale names are system
> specific (For example windows accepts 'ch' as Chinese in Taiwan, where
> as IANA <http://www.iana.org/assignments/language-subtag-registry>
> considers it Chamorro) setlocale should probably grow an additional
> keyword parameter: setlocale(LC_ALL, iana='de-DE')
that'd be another fat database to blow up the python core(s).
I just wonder why locale.setlocale(locale.LC_ALL,"de_DE") doesn't accept the name, which
>>> locale.getlocale() / getdefaultlocale()
('de_DE', 'cp1252')
already deliver ?
but only this works
>>> locale.setlocale(locale.LC_ALL,'German_Germany.1252')
'German_Germany.1252'
But 'German_Germany.1252' you cannot get/guess from any locale.getxxxx function I think ...
-robert
More information about the Python-list
mailing list