@@ -1496,7 +1496,7 @@ def getpreferredencoding(do_setlocale = True):
14961496#
14971497# This list has been updated from
14981498# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp
1499- # to include every locale up to Windows XP .
1499+ # to include every locale up to Windows Vista .
15001500#
15011501# NOTE: this mapping is incomplete. If your language is missing, please
15021502# submit a bug report to Python bug manager, which you can find via:
@@ -1508,6 +1508,8 @@ def getpreferredencoding(do_setlocale = True):
15081508windows_locale = {
15091509 0x0436 : "af_ZA" , # Afrikaans
15101510 0x041c : "sq_AL" , # Albanian
1511+ 0x0484 : "gsw_FR" ,# Alsatian - France
1512+ 0x045e : "am_ET" , # Amharic - Ethiopia
15111513 0x0401 : "ar_SA" , # Arabic - Saudi Arabia
15121514 0x0801 : "ar_IQ" , # Arabic - Iraq
15131515 0x0c01 : "ar_EG" , # Arabic - Egypt
@@ -1525,15 +1527,18 @@ def getpreferredencoding(do_setlocale = True):
15251527 0x3c01 : "ar_BH" , # Arabic - Bahrain
15261528 0x4001 : "ar_QA" , # Arabic - Qatar
15271529 0x042b : "hy_AM" , # Armenian
1528- 0x042c : "az_AZ" , # Azeri Latin
1530+ 0x044d : "as_IN" , # Assamese - India
1531+ 0x042c : "az_AZ" , # Azeri - Latin
15291532 0x082c : "az_AZ" , # Azeri - Cyrillic
1530- 0x042d : "eu_ES" , # Basque
1533+ 0x046d : "ba_RU" , # Bashkir
1534+ 0x042d : "eu_ES" , # Basque - Russia
15311535 0x0423 : "be_BY" , # Belarusian
15321536 0x0445 : "bn_IN" , # Begali
1533- 0x201a : "bs_BA" , # Bosnian
1534- 0x141a : "bs_BA" , # Bosnian - Cyrillic
1537+ 0x201a : "bs_BA" , # Bosnian - Cyrillic
1538+ 0x141a : "bs_BA" , # Bosnian - Latin
15351539 0x047e : "br_FR" , # Breton - France
15361540 0x0402 : "bg_BG" , # Bulgarian
1541+ # 0x0455: "my_MM", # Burmese - Not supported
15371542 0x0403 : "ca_ES" , # Catalan
15381543 0x0004 : "zh_CHS" ,# Chinese - Simplified
15391544 0x0404 : "zh_TW" , # Chinese - Taiwan
@@ -1542,6 +1547,7 @@ def getpreferredencoding(do_setlocale = True):
15421547 0x1004 : "zh_SG" , # Chinese - Singapore
15431548 0x1404 : "zh_MO" , # Chinese - Macao S.A.R.
15441549 0x7c04 : "zh_CHT" ,# Chinese - Traditional
1550+ 0x0483 : "co_FR" , # Corsican - France
15451551 0x041a : "hr_HR" , # Croatian
15461552 0x101a : "hr_BA" , # Croatian - Bosnia
15471553 0x0405 : "cs_CZ" , # Czech
@@ -1562,7 +1568,10 @@ def getpreferredencoding(do_setlocale = True):
15621568 0x2809 : "en_BZ" , # English - Belize
15631569 0x2c09 : "en_TT" , # English - Trinidad
15641570 0x3009 : "en_ZW" , # English - Zimbabwe
1565- 0x3409 : "en_PH" , # English - Phillippines
1571+ 0x3409 : "en_PH" , # English - Philippines
1572+ 0x4009 : "en_IN" , # English - India
1573+ 0x4409 : "en_MY" , # English - Malaysia
1574+ 0x4809 : "en_IN" , # English - Singapore
15661575 0x0425 : "et_EE" , # Estonian
15671576 0x0438 : "fo_FO" , # Faroese
15681577 0x0464 : "fil_PH" ,# Filipino
@@ -1582,38 +1591,44 @@ def getpreferredencoding(do_setlocale = True):
15821591 0x1007 : "de_LU" , # German - Luxembourg
15831592 0x1407 : "de_LI" , # German - Liechtenstein
15841593 0x0408 : "el_GR" , # Greek
1594+ 0x046f : "kl_GL" , # Greenlandic - Greenland
15851595 0x0447 : "gu_IN" , # Gujarati
1596+ 0x0468 : "ha_NG" , # Hausa - Latin
15861597 0x040d : "he_IL" , # Hebrew
15871598 0x0439 : "hi_IN" , # Hindi
15881599 0x040e : "hu_HU" , # Hungarian
15891600 0x040f : "is_IS" , # Icelandic
15901601 0x0421 : "id_ID" , # Indonesian
1591- 0x045d : "iu_CA" , # Inuktitut
1602+ 0x045d : "iu_CA" , # Inuktitut - Syllabics
15921603 0x085d : "iu_CA" , # Inuktitut - Latin
15931604 0x083c : "ga_IE" , # Irish - Ireland
1594- 0x0434 : "xh_ZA" , # Xhosa - South Africa
1595- 0x0435 : "zu_ZA" , # Zulu
15961605 0x0410 : "it_IT" , # Italian - Italy
15971606 0x0810 : "it_CH" , # Italian - Switzerland
15981607 0x0411 : "ja_JP" , # Japanese
15991608 0x044b : "kn_IN" , # Kannada - India
16001609 0x043f : "kk_KZ" , # Kazakh
1610+ 0x0453 : "kh_KH" , # Khmer - Cambodia
1611+ 0x0486 : "qut_GT" ,# K'iche - Guatemala
1612+ 0x0487 : "rw_RW" , # Kinyarwanda - Rwanda
16011613 0x0457 : "kok_IN" ,# Konkani
16021614 0x0412 : "ko_KR" , # Korean
16031615 0x0440 : "ky_KG" , # Kyrgyz
1616+ 0x0454 : "lo_LA" , # Lao - Lao PDR
16041617 0x0426 : "lv_LV" , # Latvian
16051618 0x0427 : "lt_LT" , # Lithuanian
1619+ 0x082e : "dsb_DE" ,# Lower Sorbian - Germany
16061620 0x046e : "lb_LU" , # Luxembourgish
1607- 0x042f : "mk_MK" , # FYRO Macedonian
1621+ 0x042f : "mk_MK" , # FYROM Macedonian
16081622 0x043e : "ms_MY" , # Malay - Malaysia
1609- 0x083e : "ms_BN" , # Malay - Brunei
1623+ 0x083e : "ms_BN" , # Malay - Brunei Darussalam
16101624 0x044c : "ml_IN" , # Malayalam - India
16111625 0x043a : "mt_MT" , # Maltese
16121626 0x0481 : "mi_NZ" , # Maori
16131627 0x047a : "arn_CL" ,# Mapudungun
16141628 0x044e : "mr_IN" , # Marathi
16151629 0x047c : "moh_CA" ,# Mohawk - Canada
1616- 0x0450 : "mn_MN" , # Mongolian
1630+ 0x0450 : "mn_MN" , # Mongolian - Cyrillic
1631+ 0x0850 : "mn_CN" , # Mongolian - PRC
16171632 0x0461 : "ne_NP" , # Nepali
16181633 0x0414 : "nb_NO" , # Norwegian - Bokmal
16191634 0x0814 : "nn_NO" , # Norwegian - Nynorsk
@@ -1629,7 +1644,7 @@ def getpreferredencoding(do_setlocale = True):
16291644 0x086b : "quz_EC" ,# Quechua (Ecuador)
16301645 0x0c6b : "quz_PE" ,# Quechua (Peru)
16311646 0x0418 : "ro_RO" , # Romanian - Romania
1632- 0x0417 : "rm_CH" , # Raeto-Romanese
1647+ 0x0417 : "rm_CH" , # Romansh
16331648 0x0419 : "ru_RU" , # Russian
16341649 0x243b : "smn_FI" ,# Sami Finland
16351650 0x103b : "smj_NO" ,# Sami Norway
@@ -1645,6 +1660,7 @@ def getpreferredencoding(do_setlocale = True):
16451660 0x1c1a : "sr_BA" , # Serbian - Bosnia Cyrillic
16461661 0x081a : "sr_SP" , # Serbian - Latin
16471662 0x181a : "sr_BA" , # Serbian - Bosnia Latin
1663+ 0x045b : "si_LK" , # Sinhala - Sri Lanka
16481664 0x046c : "ns_ZA" , # Northern Sotho
16491665 0x0432 : "tn_ZA" , # Setswana - Southern Africa
16501666 0x041b : "sk_SK" , # Slovak
@@ -1669,22 +1685,37 @@ def getpreferredencoding(do_setlocale = True):
16691685 0x480a : "es_HN" , # Spanish - Honduras
16701686 0x4c0a : "es_NI" , # Spanish - Nicaragua
16711687 0x500a : "es_PR" , # Spanish - Puerto Rico
1688+ 0x540a : "es_US" , # Spanish - United States
1689+ # 0x0430: "", # Sutu - Not supported
16721690 0x0441 : "sw_KE" , # Swahili
16731691 0x041d : "sv_SE" , # Swedish - Sweden
16741692 0x081d : "sv_FI" , # Swedish - Finland
16751693 0x045a : "syr_SY" ,# Syriac
1694+ 0x0428 : "tg_TJ" , # Tajik - Cyrillic
1695+ 0x085f : "tmz_DZ" ,# Tamazight - Latin
16761696 0x0449 : "ta_IN" , # Tamil
16771697 0x0444 : "tt_RU" , # Tatar
16781698 0x044a : "te_IN" , # Telugu
16791699 0x041e : "th_TH" , # Thai
1700+ 0x0851 : "bo_BT" , # Tibetan - Bhutan
1701+ 0x0451 : "bo_CN" , # Tibetan - PRC
16801702 0x041f : "tr_TR" , # Turkish
1703+ 0x0442 : "tk_TM" , # Turkmen - Cyrillic
1704+ 0x0480 : "ug_CN" , # Uighur - Arabic
16811705 0x0422 : "uk_UA" , # Ukrainian
1706+ 0x042e : "wen_DE" ,# Upper Sorbian - Germany
16821707 0x0420 : "ur_PK" , # Urdu
16831708 0x0820 : "ur_IN" , # Urdu - India
16841709 0x0443 : "uz_UZ" , # Uzbek - Latin
16851710 0x0843 : "uz_UZ" , # Uzbek - Cyrillic
16861711 0x042a : "vi_VN" , # Vietnamese
16871712 0x0452 : "cy_GB" , # Welsh
1713+ 0x0488 : "wo_SN" , # Wolof - Senegal
1714+ 0x0434 : "xh_ZA" , # Xhosa - South Africa
1715+ 0x0485 : "sah_RU" ,# Yakut - Cyrillic
1716+ 0x0478 : "ii_CN" , # Yi - PRC
1717+ 0x046a : "yo_NG" , # Yoruba - Nigeria
1718+ 0x0435 : "zu_ZA" , # Zulu
16881719}
16891720
16901721def _print_locale ():
0 commit comments