This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: missing mappings in locale tables
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: lemburg Nosy List: effbot, lemburg, loewis, older, rhettinger
Priority: normal Keywords:

Created on 2002-10-09 12:39 by effbot, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (9)
msg12672 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2002-10-09 12:39
(via mail from Oleg Deribas)

Here are two missed mappings in locale.py for russian 
and ukrainian languages:

    0x0422: "uk_UA", # Ukrainian (Ukraine)
    0x0419: "ru_RU", # Russian (Russia)

locale_alias table also misses mapping for ukrainian:

        'uk':                            'uk_UA.CP1251',
        'uk_uk':                         'uk_UA.CP1251',

Is it possible to include this in sources?
msg12673 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-09 12:55
Logged In: YES 
user_id=21627

I'm sure many more are missing also, Microsoft has currently
143 language identifiers.

Assuming this goes into windows_locale, why does it have a a
codeset in it?
msg12674 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-10-09 15:54
Logged In: YES 
user_id=80475

In some non-python projects (found through a google 
search), uk_uk is an encoding alias for KOI8-U.
msg12675 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-09 17:38
Logged In: YES 
user_id=21627

I withdraw my question on windows_locale.

As for uk_uk, it appears to be completely bogus. The country
code for the Ukraine is UA, not UK (this is semi-officially,
i.e. IANA-assigned, the United Kingdom).

As for associating CP1251 with them: I don't care; I find
the whole notion of "getdefaultlocale" broken. People can
also arrange their systems to use uk_UA with UTF-8 if they
want to, or iso-8859-5 (although the latter is reportedly
insufficient for Ukrainian).

Fredrik, feel free to add whatever you think appropriate.
msg12676 - (view) Author: Oleg Deribas (older) Date: 2002-10-20 19:02
Logged In: YES 
user_id=281684

There is also problem with default charset on windows. It
have different charsets for GUI and textmode (OEM and ANSI).
So for Ukrainian it is 1251 and 866 codepages accordingly.
And windows uses non-POSIX locale names like ukr_ukr.1251
instead of uk_UA.CP1251
msg12677 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-20 19:25
Logged In: YES 
user_id=21627

The problem with the OEMCP is more complex, given the chcp
utility (i.e. that the console code page may vary from
console to console), see patch 612627. So I don't think we
should keep a database of OEM code pages.
msg12678 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2005-02-14 22:17
Logged In: YES 
user_id=38376

(should I mark this as "won't fix" and close it?)
msg12679 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-02-14 23:19
Logged In: YES 
user_id=21627

I think that would be appropriate.
msg12680 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2005-02-15 09:31
Logged In: YES 
user_id=38388

We already have locale_alias table mappings for the Ukraine,
albeit different ones.

I'll look into updating the windows_locale table to include
all the identifiers from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp,
the official source for these ids.
History
Date User Action Args
2022-04-10 16:05:44adminsetgithub: 37291
2002-10-09 12:39:11effbotcreate