Skip to content

Commit cece1e7

Browse files
Fix test_chinese_codecs and test_korean_codecs.
1 parent 08c2110 commit cece1e7

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/test/test_email/test_asian_codecs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ def test_chinese_codecs(self):
8383
h.append(s, Charset('big5hkscs'))
8484
eq(h.encode(), """\
8585
Chinese =?gb2312?b?1tDOxA==?= =?gbk?b?1tDOxA==?= =?gb18030?b?1tDOxA==?=
86-
=?hz?b?fntWUE5Efn0=?= =?big5?b?pKSk5Q==?= =?big5hkscs?b?pKSk5Q==?=""")
86+
=?hz-gb-2312?b?fntWUE5Efn0=?= =?big5?b?pKSk5Q==?= =?big5-hkscs?b?pKSk5Q==?=""")
8787
eq(decode_header(h.encode()),
8888
[(b'Chinese ', None),
8989
(b'\xd6\xd0\xce\xc4', 'gb2312'),
9090
(b'\xd6\xd0\xce\xc4', 'gbk'),
9191
(b'\xd6\xd0\xce\xc4', 'gb18030'),
92-
(b'~{VPND~}', 'hz'),
92+
(b'~{VPND~}', 'hz-gb-2312'),
9393
(b'\xa4\xa4\xa4\xe5', 'big5'),
94-
(b'\xa4\xa4\xa4\xe5', 'big5hkscs'),
94+
(b'\xa4\xa4\xa4\xe5', 'big5-hkscs'),
9595
])
9696

9797
def test_korean_codecs(self):
@@ -104,12 +104,12 @@ def test_korean_codecs(self):
104104
h.append(s, Charset('iso-2022-kr'))
105105
h.append(s, Charset('johab'))
106106
eq(h.encode(), """\
107-
Korean =?euc-kr?b?x9Gxub7u?= =?ks_c_5601-1987?b?x9Gxub7uIMfRsbm+7g==?=
107+
Korean =?euc-kr?b?x9Gxub7uIMfRsbm+7g==?= =?ks_c_5601-1987?b?x9Gxub7u?=
108108
=?iso-2022-kr?b?GyQpQw5HUTE5Pm4P?= =?johab?b?0GWKgrTh?=""")
109109
eq(decode_header(h.encode()),
110110
[(b'Korean ', None),
111-
(b'\xc7\xd1\xb1\xb9\xbe\xee', 'euc-kr'),
112-
(b'\xc7\xd1\xb1\xb9\xbe\xee \xc7\xd1\xb1\xb9\xbe\xee', 'ks_c_5601-1987'),
111+
(b'\xc7\xd1\xb1\xb9\xbe\xee \xc7\xd1\xb1\xb9\xbe\xee', 'euc-kr'),
112+
(b'\xc7\xd1\xb1\xb9\xbe\xee', 'ks_c_5601-1987'),
113113
(b'\x1b$)C\x0eGQ19>n\x0f', 'iso-2022-kr'),
114114
(b'\xd0e\x8a\x82\xb4\xe1', 'johab'),
115115
])

0 commit comments

Comments
 (0)