summaryrefslogtreecommitdiff
path: root/Lib/test/test_multibytecodec.py
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2006-09-07 12:50:38 +0000
committerHye-Shik Chang <hyeshik@gmail.com>2006-09-07 12:50:38 +0000
commit137ae0cf7ca4dc6e4bc740dc51d25427bcea8477 (patch)
tree9dc2187d3e3d0eb7460d8a9d63f96083fcd40c74 /Lib/test/test_multibytecodec.py
parentd6872b1ecf018f385ec3db9fff64f427eade1ae4 (diff)
downloadcpython-git-137ae0cf7ca4dc6e4bc740dc51d25427bcea8477.tar.gz
Backport from trunk r51737:
Fixed a few bugs on cjkcodecs: - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly. - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312 codepoints to conform the standard. - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2 codepoints now.
Diffstat (limited to 'Lib/test/test_multibytecodec.py')
-rw-r--r--Lib/test/test_multibytecodec.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index 397ebeb97a..800456e23b 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -202,6 +202,12 @@ class Test_ISO2022(unittest.TestCase):
uni = u':hu4:unit\xe9 de famille'
self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni)
+ def test_iso2022_jp_g0(self):
+ self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2'))
+ for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'):
+ e = u'\u3406'.encode(encoding)
+ self.failIf(filter(lambda x: x >= '\x80', e))
+
def test_main():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test_MultibyteCodec))