summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_locale.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_locale.py')
-rw-r--r--Lib/test/test_locale.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
index 726c2f9..ab990ae 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -384,6 +384,7 @@ class NormalizeTest(unittest.TestCase):
def test_english(self):
self.check('en', 'en_US.ISO8859-1')
self.check('EN', 'en_US.ISO8859-1')
+ self.check('en.iso88591', 'en_US.ISO8859-1')
self.check('en_US', 'en_US.ISO8859-1')
self.check('en_us', 'en_US.ISO8859-1')
self.check('en_GB', 'en_GB.ISO8859-1')
@@ -392,7 +393,10 @@ class NormalizeTest(unittest.TestCase):
self.check('en_US:UTF-8', 'en_US.UTF-8')
self.check('en_US.ISO8859-1', 'en_US.ISO8859-1')
self.check('en_US.US-ASCII', 'en_US.ISO8859-1')
+ self.check('en_US.88591', 'en_US.ISO8859-1')
+ self.check('en_US.885915', 'en_US.ISO8859-15')
self.check('english', 'en_EN.ISO8859-1')
+ self.check('english_uk.ascii', 'en_GB.ISO8859-1')
def test_hyphenated_encoding(self):
self.check('az_AZ.iso88599e', 'az_AZ.ISO8859-9E')
@@ -412,10 +416,12 @@ class NormalizeTest(unittest.TestCase):
def test_euro_modifier(self):
self.check('de_DE@euro', 'de_DE.ISO8859-15')
self.check('en_US.ISO8859-15@euro', 'en_US.ISO8859-15')
+ self.check('de_DE.utf8@euro', 'de_DE.UTF-8')
def test_latin_modifier(self):
self.check('be_BY.UTF-8@latin', 'be_BY.UTF-8@latin')
self.check('sr_RS.UTF-8@latin', 'sr_RS.UTF-8@latin')
+ self.check('sr_RS.UTF-8@latn', 'sr_RS.UTF-8@latin')
def test_valencia_modifier(self):
self.check('ca_ES.UTF-8@valencia', 'ca_ES.UTF-8@valencia')
@@ -436,6 +442,39 @@ class NormalizeTest(unittest.TestCase):
self.check('sd_IN', 'sd_IN.UTF-8')
self.check('sd', 'sd_IN.UTF-8')
+ def test_euc_encoding(self):
+ self.check('ja_jp.euc', 'ja_JP.eucJP')
+ self.check('ja_jp.eucjp', 'ja_JP.eucJP')
+ self.check('ko_kr.euc', 'ko_KR.eucKR')
+ self.check('ko_kr.euckr', 'ko_KR.eucKR')
+ self.check('zh_cn.euc', 'zh_CN.eucCN')
+ self.check('zh_tw.euc', 'zh_TW.eucTW')
+ self.check('zh_tw.euctw', 'zh_TW.eucTW')
+
+ def test_japanese(self):
+ self.check('ja', 'ja_JP.eucJP')
+ self.check('ja.jis', 'ja_JP.JIS7')
+ self.check('ja.sjis', 'ja_JP.SJIS')
+ self.check('ja_jp', 'ja_JP.eucJP')
+ self.check('ja_jp.ajec', 'ja_JP.eucJP')
+ self.check('ja_jp.euc', 'ja_JP.eucJP')
+ self.check('ja_jp.eucjp', 'ja_JP.eucJP')
+ self.check('ja_jp.iso-2022-jp', 'ja_JP.JIS7')
+ self.check('ja_jp.iso2022jp', 'ja_JP.JIS7')
+ self.check('ja_jp.jis', 'ja_JP.JIS7')
+ self.check('ja_jp.jis7', 'ja_JP.JIS7')
+ self.check('ja_jp.mscode', 'ja_JP.SJIS')
+ self.check('ja_jp.pck', 'ja_JP.SJIS')
+ self.check('ja_jp.sjis', 'ja_JP.SJIS')
+ self.check('ja_jp.ujis', 'ja_JP.eucJP')
+ self.check('ja_jp.utf8', 'ja_JP.UTF-8')
+ self.check('japan', 'ja_JP.eucJP')
+ self.check('japanese', 'ja_JP.eucJP')
+ self.check('japanese-euc', 'ja_JP.eucJP')
+ self.check('japanese.euc', 'ja_JP.eucJP')
+ self.check('japanese.sjis', 'ja_JP.SJIS')
+ self.check('jp_jp', 'ja_JP.eucJP')
+
class TestMiscellaneous(unittest.TestCase):
def test_getpreferredencoding(self):