summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/test/test_email_codecs.py7
-rw-r--r--Lib/encodings/aliases.py109
-rw-r--r--Lib/encodings/big5.py34
-rw-r--r--Lib/encodings/cp932.py34
-rw-r--r--Lib/encodings/cp949.py34
-rw-r--r--Lib/encodings/cp950.py34
-rw-r--r--Lib/encodings/euc_jisx0213.py34
-rw-r--r--Lib/encodings/euc_jp.py34
-rw-r--r--Lib/encodings/euc_kr.py34
-rw-r--r--Lib/encodings/gb18030.py34
-rw-r--r--Lib/encodings/gb2312.py34
-rw-r--r--Lib/encodings/gbk.py34
-rw-r--r--Lib/encodings/hz.py34
-rw-r--r--Lib/encodings/iso2022_jp.py34
-rw-r--r--Lib/encodings/iso2022_jp_1.py34
-rw-r--r--Lib/encodings/iso2022_jp_2.py34
-rw-r--r--Lib/encodings/iso2022_jp_3.py34
-rw-r--r--Lib/encodings/iso2022_jp_ext.py34
-rw-r--r--Lib/encodings/iso2022_kr.py34
-rw-r--r--Lib/encodings/johab.py34
-rw-r--r--Lib/encodings/shift_jis.py34
-rw-r--r--Lib/encodings/shift_jisx0213.py34
-rw-r--r--Lib/test/cjkencodings_test.py1001
-rwxr-xr-xLib/test/regrtest.py19
-rw-r--r--Lib/test/test_codecencodings_cn.py61
-rw-r--r--Lib/test/test_codecencodings_jp.py134
-rw-r--r--Lib/test/test_codecencodings_kr.py57
-rw-r--r--Lib/test/test_codecencodings_tw.py31
-rw-r--r--Lib/test/test_codecmaps_cn.py34
-rw-r--r--Lib/test/test_codecmaps_jp.py90
-rw-r--r--Lib/test/test_codecmaps_kr.py51
-rw-r--r--Lib/test/test_codecmaps_tw.py39
-rw-r--r--Lib/test/test_multibytecodec.py79
-rw-r--r--Lib/test/test_multibytecodec_support.py233
34 files changed, 2600 insertions, 25 deletions
diff --git a/Lib/email/test/test_email_codecs.py b/Lib/email/test/test_email_codecs.py
index 99a3227..75ef081 100644
--- a/Lib/email/test/test_email_codecs.py
+++ b/Lib/email/test/test_email_codecs.py
@@ -8,13 +8,6 @@ from email.test.test_email import TestEmailBase
from email.Charset import Charset
from email.Header import Header, decode_header
-# See if we have the Japanese codecs package installed
-try:
- unicode('foo', 'japanese.iso-2022-jp')
-except LookupError:
- raise TestSkipped, 'Optional Japanese codecs not installed'
-
-
class TestEmailAsianCodecs(TestEmailBase):
def test_japanese_codecs(self):
diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py
index b304f15..0594171 100644
--- a/Lib/encodings/aliases.py
+++ b/Lib/encodings/aliases.py
@@ -14,12 +14,6 @@
codecs. In addition to these, a few Python specific codec
aliases have also been added.
- About the CJK codec aliases:
-
- The codecs for these encodings are not distributed with the
- Python core, but are included here for reference, since the
- locale module relies on having these aliases available.
-
"""
aliases = {
@@ -41,6 +35,10 @@ aliases = {
'base64' : 'base64_codec',
'base_64' : 'base64_codec',
+ # big5 codec
+ 'big5_tw' : 'big5',
+ 'csbig5' : 'big5',
+
# bz2_codec codec
'bz2' : 'bz2_codec',
@@ -168,9 +166,91 @@ aliases = {
'csibm869' : 'cp869',
'ibm869' : 'cp869',
+ # cp932 codec
+ '932' : 'cp932',
+ 'ms932' : 'cp932',
+ 'mskanji' : 'cp932',
+ 'ms_kanji' : 'cp932',
+
+ # cp949 codec
+ '949' : 'cp949',
+ 'ms949' : 'cp949',
+ 'uhc' : 'cp949',
+
+ # cp950 codec
+ '950' : 'cp950',
+ 'ms950' : 'cp950',
+
+ # euc_jisx0213 codec
+ 'jisx0213' : 'euc_jisx0213',
+ 'eucjisx0213' : 'euc_jisx0213',
+
+ # euc_jp codec
+ 'eucjp' : 'euc_jp',
+ 'ujis' : 'euc_jp',
+ 'u_jis' : 'euc_jp',
+
+ # euc_kr codec
+ 'euckr' : 'euc_kr',
+ 'korean' : 'euc_kr',
+ 'ksc5601' : 'euc_kr',
+ 'ks_c_5601' : 'euc_kr',
+ 'ks_c_5601_1987' : 'euc_kr',
+ 'ksx1001' : 'euc_kr',
+ 'ks_x_1001' : 'euc_kr',
+
+ # gb18030 codec
+ 'gb18030_2000' : 'gb18030',
+
+ # gb2312 codec
+ 'chinese' : 'gb2312',
+ 'csiso58gb231280' : 'gb2312',
+ 'euc_cn' : 'gb2312',
+ 'euccn' : 'gb2312',
+ 'eucgb2312_cn' : 'gb2312',
+ 'gb2312_1980' : 'gb2312',
+ 'gb2312_80' : 'gb2312',
+ 'iso_ir_58' : 'gb2312',
+
+ # gbk codec
+ '936' : 'gbk',
+ 'cp936' : 'gbk',
+ 'ms936' : 'gbk',
+
# hex_codec codec
'hex' : 'hex_codec',
+ # hz codec
+ 'hzgb' : 'hz',
+ 'hz_gb' : 'hz',
+ 'hz_gb_2312' : 'hz',
+
+ # iso2022_jp codec
+ 'csiso2022jp' : 'iso2022_jp',
+ 'iso2022jp' : 'iso2022_jp',
+ 'iso_2022_jp' : 'iso2022_jp',
+
+ # iso2022_jp_1 codec
+ 'iso2022jp_1' : 'iso2022_jp_1',
+ 'iso_2022_jp_1' : 'iso2022_jp_1',
+
+ # iso2022_jp_2 codec
+ 'iso2022jp_2' : 'iso2022_jp_2',
+ 'iso_2022_jp_2' : 'iso2022_jp_2',
+
+ # iso_3022_jp_3 codec
+ 'iso2022jp_3' : 'iso2022_jp_3',
+ 'iso_2022_jp_3' : 'iso2022_jp_3',
+
+ # iso2022_jp_ext codec
+ 'iso2022jp_ext' : 'iso2022_jp_ext',
+ 'iso_2022_jp_ext' : 'iso2022_jp_ext',
+
+ # iso2022_kr codec
+ 'csiso2022kr' : 'iso2022_kr',
+ 'iso2022kr' : 'iso2022_kr',
+ 'iso_2022_kr' : 'iso2022_kr',
+
# iso8859_10 codec
'csisolatin6' : 'iso8859_10',
'iso_8859_10' : 'iso8859_10',
@@ -258,9 +338,9 @@ aliases = {
'l5' : 'iso8859_9',
'latin5' : 'iso8859_9',
- # jis_7 codec
- 'csiso2022jp' : 'jis_7',
- 'iso_2022_jp' : 'jis_7',
+ # johab codec
+ 'cp1361' : 'johab',
+ 'ms1361' : 'johab',
# koi8_r codec
'cskoi8r' : 'koi8_r',
@@ -308,6 +388,17 @@ aliases = {
# rot_13 codec
'rot13' : 'rot_13',
+ # shift_jis codec
+ 'csshiftjis' : 'shift_jis',
+ 'shiftjis' : 'shift_jis',
+ 'sjis' : 'shift_jis',
+ 's_jis' : 'shift_jis',
+
+ # shift_jisx0213 codec
+ 'shiftjisx0213' : 'shift_jisx0213',
+ 'sjisx0213' : 'shift_jisx0213',
+ 's_jisx0213' : 'shift_jisx0213',
+
# tactis codec
'tis260' : 'tactis',
diff --git a/Lib/encodings/big5.py b/Lib/encodings/big5.py
new file mode 100644
index 0000000..2346274
--- /dev/null
+++ b/Lib/encodings/big5.py
@@ -0,0 +1,34 @@
+#
+# big5.py: Python Unicode Codec for BIG5
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: big5.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_big5 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/cp932.py b/Lib/encodings/cp932.py
new file mode 100644
index 0000000..4bd8894
--- /dev/null
+++ b/Lib/encodings/cp932.py
@@ -0,0 +1,34 @@
+#
+# cp932.py: Python Unicode Codec for CP932
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: cp932.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_cp932 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/cp949.py b/Lib/encodings/cp949.py
new file mode 100644
index 0000000..0a0b009
--- /dev/null
+++ b/Lib/encodings/cp949.py
@@ -0,0 +1,34 @@
+#
+# cp949.py: Python Unicode Codec for CP949
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: cp949.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_cp949 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/cp950.py b/Lib/encodings/cp950.py
new file mode 100644
index 0000000..a3b6c0e
--- /dev/null
+++ b/Lib/encodings/cp950.py
@@ -0,0 +1,34 @@
+#
+# cp950.py: Python Unicode Codec for CP950
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: cp950.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_cp950 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/euc_jisx0213.py b/Lib/encodings/euc_jisx0213.py
new file mode 100644
index 0000000..d54e864
--- /dev/null
+++ b/Lib/encodings/euc_jisx0213.py
@@ -0,0 +1,34 @@
+#
+# euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: euc_jisx0213.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_euc_jisx0213 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/euc_jp.py b/Lib/encodings/euc_jp.py
new file mode 100644
index 0000000..ff3b155
--- /dev/null
+++ b/Lib/encodings/euc_jp.py
@@ -0,0 +1,34 @@
+#
+# euc_jp.py: Python Unicode Codec for EUC_JP
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: euc_jp.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_euc_jp import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/euc_kr.py b/Lib/encodings/euc_kr.py
new file mode 100644
index 0000000..7ad237e
--- /dev/null
+++ b/Lib/encodings/euc_kr.py
@@ -0,0 +1,34 @@
+#
+# euc_kr.py: Python Unicode Codec for EUC_KR
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: euc_kr.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_euc_kr import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/gb18030.py b/Lib/encodings/gb18030.py
new file mode 100644
index 0000000..921ab50
--- /dev/null
+++ b/Lib/encodings/gb18030.py
@@ -0,0 +1,34 @@
+#
+# gb18030.py: Python Unicode Codec for GB18030
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: gb18030.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_gb18030 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/gb2312.py b/Lib/encodings/gb2312.py
new file mode 100644
index 0000000..8f8bfd1
--- /dev/null
+++ b/Lib/encodings/gb2312.py
@@ -0,0 +1,34 @@
+#
+# gb2312.py: Python Unicode Codec for GB2312
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: gb2312.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_gb2312 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/gbk.py b/Lib/encodings/gbk.py
new file mode 100644
index 0000000..557058d
--- /dev/null
+++ b/Lib/encodings/gbk.py
@@ -0,0 +1,34 @@
+#
+# gbk.py: Python Unicode Codec for GBK
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: gbk.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_gbk import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/hz.py b/Lib/encodings/hz.py
new file mode 100644
index 0000000..0e87a56
--- /dev/null
+++ b/Lib/encodings/hz.py
@@ -0,0 +1,34 @@
+#
+# hz.py: Python Unicode Codec for HZ
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: hz.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_hz import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/iso2022_jp.py b/Lib/encodings/iso2022_jp.py
new file mode 100644
index 0000000..c3f3150
--- /dev/null
+++ b/Lib/encodings/iso2022_jp.py
@@ -0,0 +1,34 @@
+#
+# iso2022_jp.py: Python Unicode Codec for ISO_2022_JP
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: iso2022_jp.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_iso2022_jp import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/iso2022_jp_1.py b/Lib/encodings/iso2022_jp_1.py
new file mode 100644
index 0000000..292cc9c
--- /dev/null
+++ b/Lib/encodings/iso2022_jp_1.py
@@ -0,0 +1,34 @@
+#
+# iso2022_jp_1.py: Python Unicode Codec for ISO_2022_JP_1
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: iso2022_jp_1.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_iso2022_jp_1 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/iso2022_jp_2.py b/Lib/encodings/iso2022_jp_2.py
new file mode 100644
index 0000000..8fb0aba
--- /dev/null
+++ b/Lib/encodings/iso2022_jp_2.py
@@ -0,0 +1,34 @@
+#
+# iso2022_jp_2.py: Python Unicode Codec for ISO_2022_JP_2
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: iso2022_jp_2.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_iso2022_jp_2 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/iso2022_jp_3.py b/Lib/encodings/iso2022_jp_3.py
new file mode 100644
index 0000000..49bde5e
--- /dev/null
+++ b/Lib/encodings/iso2022_jp_3.py
@@ -0,0 +1,34 @@
+#
+# iso2022_jp_3.py: Python Unicode Codec for ISO_2022_JP_3
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: iso2022_jp_3.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_iso2022_jp_3 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/iso2022_jp_ext.py b/Lib/encodings/iso2022_jp_ext.py
new file mode 100644
index 0000000..9ac10ce
--- /dev/null
+++ b/Lib/encodings/iso2022_jp_ext.py
@@ -0,0 +1,34 @@
+#
+# iso2022_jp_ext.py: Python Unicode Codec for ISO_2022_JP_EXT
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: iso2022_jp_ext.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_iso2022_jp_ext import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/iso2022_kr.py b/Lib/encodings/iso2022_kr.py
new file mode 100644
index 0000000..76cb92e
--- /dev/null
+++ b/Lib/encodings/iso2022_kr.py
@@ -0,0 +1,34 @@
+#
+# iso2022_kr.py: Python Unicode Codec for ISO_2022_KR
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: iso2022_kr.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_iso2022_kr import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/johab.py b/Lib/encodings/johab.py
new file mode 100644
index 0000000..f969d58
--- /dev/null
+++ b/Lib/encodings/johab.py
@@ -0,0 +1,34 @@
+#
+# johab.py: Python Unicode Codec for JOHAB
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: johab.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_johab import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/shift_jis.py b/Lib/encodings/shift_jis.py
new file mode 100644
index 0000000..3ee23ea
--- /dev/null
+++ b/Lib/encodings/shift_jis.py
@@ -0,0 +1,34 @@
+#
+# shift_jis.py: Python Unicode Codec for SHIFT_JIS
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: shift_jis.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_shift_jis import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/encodings/shift_jisx0213.py b/Lib/encodings/shift_jisx0213.py
new file mode 100644
index 0000000..a32e855
--- /dev/null
+++ b/Lib/encodings/shift_jisx0213.py
@@ -0,0 +1,34 @@
+#
+# shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213
+#
+# Written by Hye-Shik Chang <perky@FreeBSD.org>
+# $CJKCodecs: shift_jisx0213.py,v 1.3 2004/01/17 11:26:10 perky Exp $
+#
+
+from _codecs_shift_jisx0213 import codec
+import codecs
+
+class Codec(codecs.Codec):
+ encode = codec.encode
+ decode = codec.decode
+
+class StreamReader(Codec, codecs.StreamReader):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamReader.__init__(self, stream, errors)
+ __codec = codec.StreamReader(stream, errors)
+ self.read = __codec.read
+ self.readline = __codec.readline
+ self.readlines = __codec.readlines
+ self.reset = __codec.reset
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ def __init__(self, stream, errors='strict'):
+ codecs.StreamWriter.__init__(self, stream, errors)
+ __codec = codec.StreamWriter(stream, errors)
+ self.write = __codec.write
+ self.writelines = __codec.writelines
+ self.reset = __codec.reset
+
+def getregentry():
+ return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+
diff --git a/Lib/test/cjkencodings_test.py b/Lib/test/cjkencodings_test.py
new file mode 100644
index 0000000..8bd0ee7
--- /dev/null
+++ b/Lib/test/cjkencodings_test.py
@@ -0,0 +1,1001 @@
+teststring = {
+'big5': (
+"\xa6\x70\xa6\xf3\xa6\x62\x20\x50\x79\x74\x68\x6f\x6e\x20\xa4\xa4"
+"\xa8\xcf\xa5\xce\xac\x4a\xa6\xb3\xaa\xba\x20\x43\x20\x6c\x69\x62"
+"\x72\x61\x72\x79\x3f\x0a\xa1\x40\xa6\x62\xb8\xea\xb0\x54\xac\xec"
+"\xa7\xde\xa7\xd6\xb3\x74\xb5\x6f\xae\x69\xaa\xba\xa4\xb5\xa4\xd1"
+"\x2c\x20\xb6\x7d\xb5\x6f\xa4\xce\xb4\xfa\xb8\xd5\xb3\x6e\xc5\xe9"
+"\xaa\xba\xb3\x74\xab\xd7\xac\x4f\xa4\xa3\xae\x65\xa9\xbf\xb5\xf8"
+"\xaa\xba\x0a\xbd\xd2\xc3\x44\x2e\x20\xac\xb0\xa5\x5b\xa7\xd6\xb6"
+"\x7d\xb5\x6f\xa4\xce\xb4\xfa\xb8\xd5\xaa\xba\xb3\x74\xab\xd7\x2c"
+"\x20\xa7\xda\xad\xcc\xab\x4b\xb1\x60\xa7\xc6\xb1\xe6\xaf\xe0\xa7"
+"\x51\xa5\xce\xa4\x40\xa8\xc7\xa4\x77\xb6\x7d\xb5\x6f\xa6\x6e\xaa"
+"\xba\x0a\x6c\x69\x62\x72\x61\x72\x79\x2c\x20\xa8\xc3\xa6\xb3\xa4"
+"\x40\xad\xd3\x20\x66\x61\x73\x74\x20\x70\x72\x6f\x74\x6f\x74\x79"
+"\x70\x69\x6e\x67\x20\xaa\xba\x20\x70\x72\x6f\x67\x72\x61\x6d\x6d"
+"\x69\x6e\x67\x20\x6c\x61\x6e\x67\x75\x61\x67\x65\x20\xa5\x69\x0a"
+"\xa8\xd1\xa8\xcf\xa5\xce\x2e\x20\xa5\xd8\xab\x65\xa6\xb3\xb3\x5c"
+"\xb3\x5c\xa6\x68\xa6\x68\xaa\xba\x20\x6c\x69\x62\x72\x61\x72\x79"
+"\x20\xac\x4f\xa5\x48\x20\x43\x20\xbc\x67\xa6\xa8\x2c\x20\xa6\xd3"
+"\x20\x50\x79\x74\x68\x6f\x6e\x20\xac\x4f\xa4\x40\xad\xd3\x0a\x66"
+"\x61\x73\x74\x20\x70\x72\x6f\x74\x6f\x74\x79\x70\x69\x6e\x67\x20"
+"\xaa\xba\x20\x70\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c"
+"\x61\x6e\x67\x75\x61\x67\x65\x2e\x20\xac\x47\xa7\xda\xad\xcc\xa7"
+"\xc6\xb1\xe6\xaf\xe0\xb1\x4e\xac\x4a\xa6\xb3\xaa\xba\x0a\x43\x20"
+"\x6c\x69\x62\x72\x61\x72\x79\x20\xae\xb3\xa8\xec\x20\x50\x79\x74"
+"\x68\x6f\x6e\x20\xaa\xba\xc0\xf4\xb9\xd2\xa4\xa4\xb4\xfa\xb8\xd5"
+"\xa4\xce\xbe\xe3\xa6\x58\x2e\x20\xa8\xe4\xa4\xa4\xb3\xcc\xa5\x44"
+"\xad\x6e\xa4\x5d\xac\x4f\xa7\xda\xad\xcc\xa9\xd2\x0a\xad\x6e\xb0"
+"\x51\xbd\xd7\xaa\xba\xb0\xdd\xc3\x44\xb4\x4e\xac\x4f\x3a\x0a\x0a",
+"\xe5\xa6\x82\xe4\xbd\x95\xe5\x9c\xa8\x20\x50\x79\x74\x68\x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x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c\x61\x6e\x67"
+"\x75\x61\x67\x65\x20\xe5\x8f\xaf\x0a\xe4\xbe\x9b\xe4\xbd\xbf\xe7"
+"\x94\xa8\x2e\x20\xe7\x9b\xae\xe5\x89\x8d\xe6\x9c\x89\xe8\xa8\xb1"
+"\xe8\xa8\xb1\xe5\xa4\x9a\xe5\xa4\x9a\xe7\x9a\x84\x20\x6c\x69\x62"
+"\x72\x61\x72\x79\x20\xe6\x98\xaf\xe4\xbb\xa5\x20\x43\x20\xe5\xaf"
+"\xab\xe6\x88\x90\x2c\x20\xe8\x80\x8c\x20\x50\x79\x74\x68\x6f\x6e"
+"\x20\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\x0a\x66\x61\x73\x74\x20"
+"\x70\x72\x6f\x74\x6f\x74\x79\x70\x69\x6e\x67\x20\xe7\x9a\x84\x20"
+"\x70\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c\x61\x6e\x67"
+"\x75\x61\x67\x65\x2e\x20\xe6\x95\x85\xe6\x88\x91\xe5\x80\x91\xe5"
+"\xb8\x8c\xe6\x9c\x9b\xe8\x83\xbd\xe5\xb0\x87\xe6\x97\xa2\xe6\x9c"
+"\x89\xe7\x9a\x84\x0a\x43\x20\x6c\x69\x62\x72\x61\x72\x79\x20\xe6"
+"\x8b\xbf\xe5\x88\xb0\x20\x50\x79\x74\x68\x6f\x6e\x20\xe7\x9a\x84"
+"\xe7\x92\xb0\xe5\xa2\x83\xe4\xb8\xad\xe6\xb8\xac\xe8\xa9\xa6\xe5"
+"\x8f\x8a\xe6\x95\xb4\xe5\x90\x88\x2e\x20\xe5\x85\xb6\xe4\xb8\xad"
+"\xe6\x9c\x80\xe4\xb8\xbb\xe8\xa6\x81\xe4\xb9\x9f\xe6\x98\xaf\xe6"
+"\x88\x91\xe5\x80\x91\xe6\x89\x80\x0a\xe8\xa6\x81\xe8\xa8\x8e\xe8"
+"\xab\x96\x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xe3\x85"
+"\xa0\x0a\xed\x9d\x90\xed\x9d\x90\xed\x9d\x90\x20\xe3\x84\xb1\xe3"
+"\x84\xb1\xe3\x84\xb1\xe2\x98\x86\xe3\x85\xa0\x5f\xe3\x85\xa0\x20"
+"\xec\x96\xb4\xeb\xa6\xa8\x20\xed\x83\xb8\xec\xbd\xb0\xea\xb8\x90"
+"\x20\xeb\x8e\x8c\xec\x9d\x91\x20\xec\xb9\x91\xe4\xb9\x9d\xeb\x93"
+"\xa4\xe4\xb9\x99\x20\xe3\x89\xaf\xeb\x93\x9c\xea\xb8\x90\x0a\xec"
+"\x84\xa4\xeb\xa6\x8c\x20\xe5\xae\xb6\xed\x9b\x80\x20\x2e\x20\x2e"
+"\x20\x2e\x20\x2e\x20\xea\xb5\xb4\xec\x95\xa0\xec\x89\x8c\x20\xe2"
+"\x93\x94\xea\xb6\x88\x20\xe2\x93\xa1\xeb\xa6\x98\xe3\x89\xb1\xea"
+"\xb8\x90\x20\xe5\x9b\xa0\xe4\xbb\x81\xe5\xb7\x9d\xef\xa6\x81\xe4"
+"\xb8\xad\xea\xb9\x8c\xec\xa6\xbc\x0a\xec\x99\x80\xec\x92\x80\xed"
+"\x9b\x80\x20\x21\x20\x21\x20\xe4\xba\x9e\xec\x98\x81\xe2\x93\x94"
+"\x20\xe5\xae\xb6\xeb\x8a\xa5\xea\xb6\x88\x20\xe2\x98\x86\xe4\xb8"
+"\x8a\xea\xb4\x80\x20\xec\x97\x86\xeb\x8a\xa5\xea\xb6\x88\xeb\x8a"
+"\xa5\x20\xe4\xba\x9e\xeb\x8a\xa5\xeb\x92\x88\xed\x9b\x80\x20\xea"
+"\xb8\x80\xec\x95\xa0\xeb\x93\xb4\x0a\xe2\x93\xa1\xeb\xa0\xa4\xeb"
+"\x93\x80\xe4\xb9\x9d\x20\xec\x8b\x80\xed\x92\x94\xec\x88\xb4\xed"
+"\x9b\x80\x20\xec\x96\xb4\xeb\xa6\xa8\x20\xe5\x9b\xa0\xe4\xb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\xa4\xb7\xa4\xc6\xc4\xc9\xb2\xc3\xa4\xb9"
+"\xa4\xeb\xa1\xa2\xa4\xc8\xa4\xa4\xa4\xa6\xa4\xce\xa4\xac\x20\x50"
+"\x79\x74\x68\x6f\x6e\x20\xa4\xce\xa5\xdd\xa5\xea\xa5\xb7\xa1\xbc"
+"\xa4\xc7\xa4\xb9\xa1\xa3\x0a\x0a\xa5\xce\xa4\xf7\x20\xa5\xfe\x20"
+"\xa5\xc8\xa5\xad\xaf\xac\xaf\xda\x20\xcf\xe3\x8f\xfe\xd8\x20\x8f"
+"\xfe\xd4\x8f\xfe\xe8\x8f\xfc\xd6\x0a",
+"\x50\x79\x74\x68\x6f\x6e\x20\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xaf\xe3\x80\x81\x31\x39\x39\x30\x20\xe5\xb9\xb4\xe3\x81"
+"\x94\xe3\x82\x8d\xe3\x81\x8b\xe3\x82\x89\xe9\x96\x8b\xe5\xa7\x8b"
+"\xe3\x81\x95\xe3\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3"
+"\x81\x99\xe3\x80\x82\x0a\xe9\x96\x8b\xe7\x99\xba\xe8\x80\x85\xe3"
+"\x81\xae\x20\x47\x75\x69\x64\x6f\x20\x76\x61\x6e\x20\x52\x6f\x73"
+"\x73\x75\x6d\x20\xe3\x81\xaf\xe6\x95\x99\xe8\x82\xb2\xe7\x94\xa8"
+"\xe3\x81\xae\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83\xa9\xe3"
+"\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e\xe3\x80"
+"\x8c\x41\x42\x43\xe3\x80\x8d\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xab\xe5\x8f\x82\xe5\x8a\xa0\xe3\x81\x97\xe3\x81\xa6\xe3"
+"\x81\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x81\x8c\xe3\x80"
+"\x81\x41\x42\x43\x20\xe3\x81\xaf\xe5\xae\x9f\xe7\x94\xa8\xe4\xb8"
+"\x8a\xe3\x81\xae\xe7\x9b\xae\xe7\x9a\x84\xe3\x81\xab\xe3\x81\xaf"
+"\xe3\x81\x82\xe3\x81\xbe\xe3\x82\x8a\xe9\x81\xa9\xe3\x81\x97\xe3"
+"\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93\xe3\x81"
+"\xa7\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a\xe3\x81\x93\xe3\x81"
+"\xae\xe3\x81\x9f\xe3\x82\x81\xe3\x80\x81\x47\x75\x69\x64\x6f\x20"
+"\xe3\x81\xaf\xe3\x82\x88\xe3\x82\x8a\xe5\xae\x9f\xe7\x94\xa8\xe7"
+"\x9a\x84\xe3\x81\xaa\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83"
+"\xa9\xe3\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e"
+"\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba\xe3\x82\x92\xe9\x96\x8b\xe5"
+"\xa7\x8b\xe3\x81\x97\xe3\x80\x81\xe8\x8b\xb1\xe5\x9b\xbd\x20\x42"
+"\x42\x53\x20\xe6\x94\xbe\xe9\x80\x81\xe3\x81\xae\xe3\x82\xb3\xe3"
+"\x83\xa1\xe3\x83\x87\xe3\x82\xa3\xe7\x95\xaa\xe7\xb5\x84\xe3\x80"
+"\x8c\xe3\x83\xa2\xe3\x83\xb3\xe3\x83\x86\xe3\x82\xa3\x20\xe3\x83"
+"\x91\xe3\x82\xa4\xe3\x82\xbd\xe3\x83\xb3\xe3\x80\x8d\xe3\x81\xae"
+"\xe3\x83\x95\xe3\x82\xa1\xe3\x83\xb3\xe3\x81\xa7\xe3\x81\x82\xe3"
+"\x82\x8b\x20\x47\x75\x69\x64\x6f\x20\xe3\x81\xaf\xe3\x81\x93\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe3\x82\x92\xe3\x80\x8c\x50\x79"
+"\x74\x68\x6f\x6e\xe3\x80\x8d\xe3\x81\xa8\xe5\x90\x8d\xe3\x81\xa5"
+"\xe3\x81\x91\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a"
+"\xe3\x81\x93\xe3\x81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe8"
+"\x83\x8c\xe6\x99\xaf\xe3\x81\x8b\xe3\x82\x89\xe7\x94\x9f\xe3\x81"
+"\xbe\xe3\x82\x8c\xe3\x81\x9f\x20\x50\x79\x74\x68\x6f\x6e\x20\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe8\xa8\xad\xe8\xa8\x88\xe3\x81"
+"\xaf\xe3\x80\x81\xe3\x80\x8c\xe3\x82\xb7\xe3\x83\xb3\xe3\x83\x97"
+"\xe3\x83\xab\xe3\x80\x8d\xe3\x81\xa7\xe3\x80\x8c\xe7\xbf\x92\xe5"
+"\xbe\x97\xe3\x81\x8c\xe5\xae\xb9\xe6\x98\x93\xe3\x80\x8d\xe3\x81"
+"\xa8\xe3\x81\x84\xe3\x81\x86\xe7\x9b\xae\xe6\xa8\x99\xe3\x81\xab"
+"\xe9\x87\x8d\xe7\x82\xb9\xe3\x81\x8c\xe7\xbd\xae\xe3\x81\x8b\xe3"
+"\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x99\xe3\x80"
+"\x82\x0a\xe5\xa4\x9a\xe3\x81\x8f\xe3\x81\xae\xe3\x82\xb9\xe3\x82"
+"\xaf\xe3\x83\xaa\xe3\x83\x97\xe3\x83\x88\xe7\xb3\xbb\xe8\xa8\x80"
+"\xe8\xaa\x9e\xe3\x81\xa7\xe3\x81\xaf\xe3\x83\xa6\xe3\x83\xbc\xe3"
+"\x82\xb6\xe3\x81\xae\xe7\x9b\xae\xe5\x85\x88\xe3\x81\xae\xe5\x88"
+"\xa9\xe4\xbe\xbf\xe6\x80\xa7\xe3\x82\x92\xe5\x84\xaa\xe5\x85\x88"
+"\xe3\x81\x97\xe3\x81\xa6\xe8\x89\xb2\xe3\x80\x85\xe3\x81\xaa\xe6"
+"\xa9\x9f\xe8\x83\xbd\xe3\x82\x92\xe8\xa8\x80\xe8\xaa\x9e\xe8\xa6"
+"\x81\xe7\xb4\xa0\xe3\x81\xa8\xe3\x81\x97\xe3\x81\xa6\xe5\x8f\x96"
+"\xe3\x82\x8a\xe5\x85\xa5\xe3\x82\x8c\xe3\x82\x8b\xe5\xa0\xb4\xe5"
+"\x90\x88\xe3\x81\x8c\xe5\xa4\x9a\xe3\x81\x84\xe3\x81\xae\xe3\x81"
+"\xa7\xe3\x81\x99\xe3\x81\x8c\xe3\x80\x81\x50\x79\x74\x68\x6f\x6e"
+"\x20\xe3\x81\xa7\xe3\x81\xaf\xe3\x81\x9d\xe3\x81\x86\xe3\x81\x84"
+"\xe3\x81\xa3\xe3\x81\x9f\xe5\xb0\x8f\xe7\xb4\xb0\xe5\xb7\xa5\xe3"
+"\x81\x8c\xe8\xbf\xbd\xe5\x8a\xa0\xe3\x81\x95\xe3\x82\x8c\xe3\x82"
+"\x8b\xe3\x81\x93\xe3\x81\xa8\xe3\x81\xaf\xe3\x81\x82\xe3\x81\xbe"
+"\xe3\x82\x8a\xe3\x81\x82\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x9b\xe3"
+"\x82\x93\xe3\x80\x82\x0a\xe8\xa8\x80\xe8\xaa\x9e\xe8\x87\xaa\xe4"
+"\xbd\x93\xe3\x81\xae\xe6\xa9\x9f\xe8\x83\xbd\xe3\x81\xaf\xe6\x9c"
+"\x80\xe5\xb0\x8f\xe9\x99\x90\xe3\x81\xab\xe6\x8a\xbc\xe3\x81\x95"
+"\xe3\x81\x88\xe3\x80\x81\xe5\xbf\x85\xe8\xa6\x81\x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7\x94\xa8"
+"\xe3\x81\xae\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83\xa9\xe3"
+"\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e\xe3\x80"
+"\x8c\x41\x42\x43\xe3\x80\x8d\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xab\xe5\x8f\x82\xe5\x8a\xa0\xe3\x81\x97\xe3\x81\xa6\xe3"
+"\x81\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x81\x8c\xe3\x80"
+"\x81\x41\x42\x43\x20\xe3\x81\xaf\xe5\xae\x9f\xe7\x94\xa8\xe4\xb8"
+"\x8a\xe3\x81\xae\xe7\x9b\xae\xe7\x9a\x84\xe3\x81\xab\xe3\x81\xaf"
+"\xe3\x81\x82\xe3\x81\xbe\xe3\x82\x8a\xe9\x81\xa9\xe3\x81\x97\xe3"
+"\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93\xe3\x81"
+"\xa7\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a\xe3\x81\x93\xe3\x81"
+"\xae\xe3\x81\x9f\xe3\x82\x81\xe3\x80\x81\x47\x75\x69\x64\x6f\x20"
+"\xe3\x81\xaf\xe3\x82\x88\xe3\x82\x8a\xe5\xae\x9f\xe7\x94\xa8\xe7"
+"\x9a\x84\xe3\x81\xaa\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83"
+"\xa9\xe3\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e"
+"\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba\xe3\x82\x92\xe9\x96\x8b\xe5"
+"\xa7\x8b\xe3\x81\x97\xe3\x80\x81\xe8\x8b\xb1\xe5\x9b\xbd\x20\x42"
+"\x42\x53\x20\xe6\x94\xbe\xe9\x80\x81\xe3\x81\xae\xe3\x82\xb3\xe3"
+"\x83\xa1\xe3\x83\x87\xe3\x82\xa3\xe7\x95\xaa\xe7\xb5\x84\xe3\x80"
+"\x8c\xe3\x83\xa2\xe3\x83\xb3\xe3\x83\x86\xe3\x82\xa3\x20\xe3\x83"
+"\x91\xe3\x82\xa4\xe3\x82\xbd\xe3\x83\xb3\xe3\x80\x8d\xe3\x81\xae"
+"\xe3\x83\x95\xe3\x82\xa1\xe3\x83\xb3\xe3\x81\xa7\xe3\x81\x82\xe3"
+"\x82\x8b\x20\x47\x75\x69\x64\x6f\x20\xe3\x81\xaf\xe3\x81\x93\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe3\x82\x92\xe3\x80\x8c\x50\x79"
+"\x74\x68\x6f\x6e\xe3\x80\x8d\xe3\x81\xa8\xe5\x90\x8d\xe3\x81\xa5"
+"\xe3\x81\x91\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a"
+"\xe3\x81\x93\xe3\x81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe8"
+"\x83\x8c\xe6\x99\xaf\xe3\x81\x8b\xe3\x82\x89\xe7\x94\x9f\xe3\x81"
+"\xbe\xe3\x82\x8c\xe3\x81\x9f\x20\x50\x79\x74\x68\x6f\x6e\x20\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe8\xa8\xad\xe8\xa8\x88\xe3\x81"
+"\xaf\xe3\x80\x81\xe3\x80\x8c\xe3\x82\xb7\xe3\x83\xb3\xe3\x83\x97"
+"\xe3\x83\xab\xe3\x80\x8d\xe3\x81\xa7\xe3\x80\x8c\xe7\xbf\x92\xe5"
+"\xbe\x97\xe3\x81\x8c\xe5\xae\xb9\xe6\x98\x93\xe3\x80\x8d\xe3\x81"
+"\xa8\xe3\x81\x84\xe3\x81\x86\xe7\x9b\xae\xe6\xa8\x99\xe3\x81\xab"
+"\xe9\x87\x8d\xe7\x82\xb9\xe3\x81\x8c\xe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\xb5\xe9"
+"\xbe\xee\xc1\xdd\xb4\xcf\xb4\xd9\x2e\x0a\x0a",
+"\xe2\x97\x8e\x20\xed\x8c\x8c\xec\x9d\xb4\xec\x8d\xac\x28\x50\x79"
+"\x74\x68\x6f\x6e\x29\xec\x9d\x80\x20\xeb\xb0\xb0\xec\x9a\xb0\xea"
+"\xb8\xb0\x20\xec\x89\xbd\xea\xb3\xa0\x2c\x20\xea\xb0\x95\xeb\xa0"
+"\xa5\xed\x95\x9c\x20\xed\x94\x84\xeb\xa1\x9c\xea\xb7\xb8\xeb\x9e"
+"\x98\xeb\xb0\x8d\x20\xec\x96\xb8\xec\x96\xb4\xec\x9e\x85\xeb\x8b"
+"\x88\xeb\x8b\xa4\x2e\x20\xed\x8c\x8c\xec\x9d\xb4\xec\x8d\xac\xec"
+"\x9d\x80\x0a\xed\x9a\xa8\xec\x9c\xa8\xec\xa0\x81\xec\x9d\xb8\x20"
+"\xea\xb3\xa0\xec\x88\x98\xec\xa4\x80\x20\xeb\x8d\xb0\xec\x9d\xb4"
+"\xed\x84\xb0\x20\xea\xb5\xac\xec\xa1\xb0\xec\x99\x80\x20\xea\xb0"
+"\x84\xeb\x8b\xa8\xed\x95\x98\xec\xa7\x80\xeb\xa7\x8c\x20\xed\x9a"
+"\xa8\xec\x9c\xa8\xec\xa0\x81\xec\x9d\xb8\x20\xea\xb0\x9d\xec\xb2"
+"\xb4\xec\xa7\x80\xed\x96\xa5\xed\x94\x84\xeb\xa1\x9c\xea\xb7\xb8"
+"\xeb\x9e\x98\xeb\xb0\x8d\xec\x9d\x84\x0a\xec\xa7\x80\xec\x9b\x90"
+"\xed\x95\xa9\xeb\x8b\x88\xeb\x8b\xa4\x2e\x20\xed\x8c\x8c\xec\x9d"
+"\xb4\xec\x8d\xac\xec\x9d\x98\x20\xec\x9a\xb0\xec\x95\x84\x28\xe5"
+"\x84\xaa\xe9\x9b\x85\x29\xed\x95\x9c\x20\xeb\xac\xb8\xeb\xb2\x95"
+"\xea\xb3\xbc\x20\xeb\x8f\x99\xec\xa0\x81\x20\xed\x83\x80\xec\x9d"
+"\xb4\xed\x95\x91\x2c\x20\xea\xb7\xb8\xeb\xa6\xac\xea\xb3\xa0\x20"
+"\xec\x9d\xb8\xed\x84\xb0\xed\x94\x84\xeb\xa6\xac\xed\x8c\x85\x0a"
+"\xed\x99\x98\xea\xb2\xbd\xec\x9d\x80\x20\xed\x8c\x8c\xec\x9d\xb4"
+"\xec\x8d\xac\xec\x9d\x84\x20\xec\x8a\xa4\xed\x81\xac\xeb\xa6\xbd"
+"\xed\x8c\x85\xea\xb3\xbc\x20\xec\x97\xac\xeb\xa0\xa4\x20\xeb\xb6"
+"\x84\xec\x95\xbc\xec\x97\x90\xec\x84\x9c\xec\x99\x80\x20\xeb\x8c"
+"\x80\xeb\xb6\x80\xeb\xb6\x84\xec\x9d\x98\x20\xed\x94\x8c\xeb\x9e"
+"\xab\xed\x8f\xbc\xec\x97\x90\xec\x84\x9c\xec\x9d\x98\x20\xeb\xb9"
+"\xa0\xeb\xa5\xb8\x0a\xec\x95\xa0\xed\x94\x8c\xeb\xa6\xac\xec\xbc"
+"\x80\xec\x9d\xb4\xec\x85\x98\x20\xea\xb0\x9c\xeb\xb0\x9c\xec\x9d"
+"\x84\x20\xed\x95\xa0\x20\xec\x88\x98\x20\xec\x9e\x88\xeb\x8a\x94"
+"\x20\xec\x9d\xb4\xec\x83\x81\xec\xa0\x81\xec\x9d\xb8\x20\xec\x96"
+"\xb8\xec\x96\xb4\xeb\xa1\x9c\x20\xeb\xa7\x8c\xeb\x93\xa4\xec\x96"
+"\xb4\xec\xa4\x8d\xeb\x8b\x88\xeb\x8b\xa4\x2e\x0a\x0a"),
+'gb18030': (
+"\x50\x79\x74\x68\x6f\x6e\xa3\xa8\xc5\xc9\xc9\xad\xa3\xa9\xd3\xef"
+"\xd1\xd4\xca\xc7\xd2\xbb\xd6\xd6\xb9\xa6\xc4\xdc\xc7\xbf\xb4\xf3"
+"\xb6\xf8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bf\xc9\x0a\xb9\xa9\xca\xb9\xd3\xc3\x2e\x20\xc4\xbf\xc7\xb0\xd3"
+"\xd0\xd4\x53\xd4\x53\xb6\xe0\xb6\xe0\xb5\xc4\x20\x6c\x69\x62\x72"
+"\x61\x72\x79\x20\xca\xc7\xd2\xd4\x20\x43\x20\x8c\x91\xb3\xc9\x2c"
+"\x20\xb6\xf8\x20\x50\x79\x74\x68\x6f\x6e\x20\xca\xc7\xd2\xbb\x82"
+"\x80\x0a\x66\x61\x73\x74\x20\x70\x72\x6f\x74\x6f\x74\x79\x70\x69"
+"\x6e\x67\x20\xb5\xc4\x20\x70\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e"
+"\x67\x20\x6c\x61\x6e\x67\x75\x61\x67\x65\x2e\x20\xb9\xca\xce\xd2"
+"\x82\x83\xcf\xa3\xcd\xfb\xc4\xdc\x8c\xa2\xbc\xc8\xd3\xd0\xb5\xc4"
+"\x0a\x43\x20\x6c\x69\x62\x72\x61\x72\x79\x20\xc4\xc3\xb5\xbd\x20"
+"\x50\x79\x74\x68\x6f\x6e\x20\xb5\xc4\xad\x68\xbe\xb3\xd6\xd0\x9c"
+"\x79\xd4\x87\xbc\xb0\xd5\xfb\xba\xcf\x2e\x20\xc6\xe4\xd6\xd0\xd7"
+"\xee\xd6\xf7\xd2\xaa\xd2\xb2\xca\xc7\xce\xd2\x82\x83\xcb\xf9\x0a"
+"\xd2\xaa\xd3\x91\xd5\x93\xb5\xc4\x86\x96\xee\x7d\xbe\xcd\xca\xc7"
+"\x3a\x0a\x83\x35\xc7\x31\x83\x33\x9a\x33\x83\x32\xb1\x31\x83\x33"
+"\x95\x31\x20\x82\x37\xd1\x36\x83\x30\x8c\x34\x83\x36\x84\x33\x20"
+"\x82\x38\x89\x35\x82\x38\xfb\x36\x83\x33\x95\x35\x20\x83\x33\xd5"
+"\x31\x82\x39\x81\x35\x20\x83\x30\xfd\x39\x83\x33\x86\x30\x20\x83"
+"\x34\xdc\x33\x83\x35\xf6\x37\x83\x35\x97\x35\x20\x83\x35\xf9\x35"
+"\x83\x30\x91\x39\x82\x38\x83\x39\x82\x39\xfc\x33\x83\x30\xf0\x34"
+"\x20\x83\x32\xeb\x39\x83\x32\xeb\x35\x82\x39\x83\x39\x2e\x0a\x0a",
+"\x50\x79\x74\x68\x6f\x6e\xef\xbc\x88\xe6\xb4\xbe\xe6\xa3\xae\xef"
+"\xbc\x89\xe8\xaf\xad\xe8\xa8\x80\xe6\x98\xaf\xe4\xb8\x80\xe7\xa7"
+"\x8d\xe5\x8a\x9f\xe8\x83\xbd\xe5\xbc\xba\xe5\xa4\xa7\xe8\x80\x8c"
+"\xe5\xae\x8c\xe5\x96\x84\xe7\x9a\x84\xe9\x80\x9a\xe7\x94\xa8\xe5"
+"\x9e\x8b\xe8\xae\xa1\xe7\xae\x97\xe6\x9c\xba\xe7\xa8\x8b\xe5\xba"
+"\x8f\xe8\xae\xbe\xe8\xae\xa1\xe8\xaf\xad\xe8\xa8\x80\xef\xbc\x8c"
+"\x0a\xe5\xb7\xb2\xe7\xbb\x8f\xe5\x85\xb7\xe6\x9c\x89\xe5\x8d\x81"
+"\xe5\xa4\x9a\xe5\xb9\xb4\xe7\x9a\x84\xe5\x8f\x91\xe5\xb1\x95\xe5"
+"\x8e\x86\xe5\x8f\xb2\xef\xbc\x8c\xe6\x88\x90\xe7\x86\x9f\xe4\xb8"
+"\x94\xe7\xa8\xb3\xe5\xae\x9a\xe3\x80\x82\xe8\xbf\x99\xe7\xa7\x8d"
+"\xe8\xaf\xad\xe8\xa8\x80\xe5\x85\xb7\xe6\x9c\x89\xe9\x9d\x9e\xe5"
+"\xb8\xb8\xe7\xae\x80\xe6\x8d\xb7\xe8\x80\x8c\xe6\xb8\x85\xe6\x99"
+"\xb0\x0a\xe7\x9a\x84\xe8\xaf\xad\xe6\xb3\x95\xe7\x89\xb9\xe7\x82"
+"\xb9\xef\xbc\x8c\xe9\x80\x82\xe5\x90\x88\xe5\xae\x8c\xe6\x88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\x70\x69\x6e\x67\x20\xe7\x9a\x84\x20\x70"
+"\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c\x61\x6e\x67\x75"
+"\x61\x67\x65\x20\xe5\x8f\xaf\x0a\xe4\xbe\x9b\xe4\xbd\xbf\xe7\x94"
+"\xa8\x2e\x20\xe7\x9b\xae\xe5\x89\x8d\xe6\x9c\x89\xe8\xa8\xb1\xe8"
+"\xa8\xb1\xe5\xa4\x9a\xe5\xa4\x9a\xe7\x9a\x84\x20\x6c\x69\x62\x72"
+"\x61\x72\x79\x20\xe6\x98\xaf\xe4\xbb\xa5\x20\x43\x20\xe5\xaf\xab"
+"\xe6\x88\x90\x2c\x20\xe8\x80\x8c\x20\x50\x79\x74\x68\x6f\x6e\x20"
+"\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\x0a\x66\x61\x73\x74\x20\x70"
+"\x72\x6f\x74\x6f\x74\x79\x70\x69\x6e\x67\x20\xe7\x9a\x84\x20\x70"
+"\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c\x61\x6e\x67\x75"
+"\x61\x67\x65\x2e\x20\xe6\x95\x85\xe6\x88\x91\xe5\x80\x91\xe5\xb8"
+"\x8c\xe6\x9c\x9b\xe8\x83\xbd\xe5\xb0\x87\xe6\x97\xa2\xe6\x9c\x89"
+"\xe7\x9a\x84\x0a\x43\x20\x6c\x69\x62\x72\x61\x72\x79\x20\xe6\x8b"
+"\xbf\xe5\x88\xb0\x20\x50\x79\x74\x68\x6f\x6e\x20\xe7\x9a\x84\xe7"
+"\x92\xb0\xe5\xa2\x83\xe4\xb8\xad\xe6\xb8\xac\xe8\xa9\xa6\xe5\x8f"
+"\x8a\xe6\x95\xb4\xe5\x90\x88\x2e\x20\xe5\x85\xb6\xe4\xb8\xad\xe6"
+"\x9c\x80\xe4\xb8\xbb\xe8\xa6\x81\xe4\xb9\x9f\xe6\x98\xaf\xe6\x88"
+"\x91\xe5\x80\x91\xe6\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x8a\xe6\xb8\xac\xe8\xa9\xa6\xe7\x9a\x84\xe9\x80\x9f\xe5\xba"
+"\xa6\x2c\x20\xe6\x88\x91\xe5\x80\x91\xe4\xbe\xbf\xe5\xb8\xb8\xe5"
+"\xb8\x8c\xe6\x9c\x9b\xe8\x83\xbd\xe5\x88\xa9\xe7\x94\xa8\xe4\xb8"
+"\x80\xe4\xba\x9b\xe5\xb7\xb2\xe9\x96\x8b\xe7\x99\xbc\xe5\xa5\xbd"
+"\xe7\x9a\x84\x0a\x6c\x69\x62\x72\x61\x72\x79\x2c\x20\xe4\xb8\xa6"
+"\xe6\x9c\x89\xe4\xb8\x80\xe5\x80\x8b\x20\x66\x61\x73\x74\x20\x70"
+"\x72\x6f\x74\x6f\x74\x79\x70\x69\x6e\x67\x20\xe7\x9a\x84\x20\x70"
+"\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c\x61\x6e\x67\x75"
+"\x61\x67\x65\x20\xe5\x8f\xaf\x0a\xe4\xbe\x9b\xe4\xbd\xbf\xe7\x94"
+"\xa8\x2e\x20\xe7\x9b\xae\xe5\x89\x8d\xe6\x9c\x89\xe8\xa8\xb1\xe8"
+"\xa8\xb1\xe5\xa4\x9a\xe5\xa4\x9a\xe7\x9a\x84\x20\x6c\x69\x62\x72"
+"\x61\x72\x79\x20\xe6\x98\xaf\xe4\xbb\xa5\x20\x43\x20\xe5\xaf\xab"
+"\xe6\x88\x90\x2c\x20\xe8\x80\x8c\x20\x50\x79\x74\x68\x6f\x6e\x20"
+"\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\x0a\x66\x61\x73\x74\x20\x70"
+"\x72\x6f\x74\x6f\x74\x79\x70\x69\x6e\x67\x20\xe7\x9a\x84\x20\x70"
+"\x72\x6f\x67\x72\x61\x6d\x6d\x69\x6e\x67\x20\x6c\x61\x6e\x67\x75"
+"\x61\x67\x65\x2e\x20\xe6\x95\x85\xe6\x88\x91\xe5\x80\x91\xe5\xb8"
+"\x8c\xe6\x9c\x9b\xe8\x83\xbd\xe5\xb0\x87\xe6\x97\xa2\xe6\x9c\x89"
+"\xe7\x9a\x84\x0a\x43\x20\x6c\x69\x62\x72\x61\x72\x79\x20\xe6\x8b"
+"\xbf\xe5\x88\xb0\x20\x50\x79\x74\x68\x6f\x6e\x20\xe7\x9a\x84\xe7"
+"\x92\xb0\xe5\xa2\x83\xe4\xb8\xad\xe6\xb8\xac\xe8\xa9\xa6\xe5\x8f"
+"\x8a\xe6\x95\xb4\xe5\x90\x88\x2e\x20\xe5\x85\xb6\xe4\xb8\xad\xe6"
+"\x9c\x80\xe4\xb8\xbb\xe8\xa6\x81\xe4\xb9\x9f\xe6\x98\xaf\xe6\x88"
+"\x91\xe5\x80\x91\xe6\x89\x80\x0a\xe8\xa6\x81\xe8\xa8\x8e\xe8\xab"
+"\x96\xe7\x9a\x84\xe5\x95\x8f\xe9\xa1\x8c\xe5\xb0\xb1\xe6\x98\xaf"
+"\x3a\x0a\x0a"),
+'johab': (
+"\x99\xb1\xa4\x77\x88\x62\xd0\x61\x20\xcd\x5c\xaf\xa1\xc5\xa9\x9c"
+"\x61\x0a\x0a\xdc\xc0\xdc\xc0\x90\x73\x21\x21\x20\xf1\x67\xe2\x9c"
+"\xf0\x55\xcc\x81\xa3\x89\x9f\x85\x8a\xa1\x20\xdc\xde\xdc\xd3\xd2"
+"\x7a\xd9\xaf\xd9\xaf\xd9\xaf\x20\x8b\x77\x96\xd3\x20\xdc\xd1\x95"
+"\x81\x20\xdc\xc0\x2e\x20\x2e\x0a\xed\x3c\xb5\x77\xdc\xd1\x93\x77"
+"\xd2\x73\x20\x2e\x20\x2e\x20\x2e\x20\x2e\x20\xac\xe1\xb6\x89\x9e"
+"\xa1\x20\x95\x65\xd0\x62\xf0\xe0\x20\xe0\x3b\xd2\x7a\x20\x21\x20"
+"\x21\x20\x21\x87\x41\x2e\x87\x41\x0a\xd3\x61\xd3\x61\xd3\x61\x20"
+"\x88\x41\x88\x41\x88\x41\xd9\x69\x87\x41\x5f\x87\x41\x20\xb4\xe1"
+"\x9f\x9a\x20\xc8\xa1\xc5\xc1\x8b\x7a\x20\x95\x61\xb7\x77\x20\xc3"
+"\x97\xe2\x9c\x97\x69\xf0\xe0\x20\xdc\xc0\x97\x61\x8b\x7a\x0a\xac"
+"\xe9\x9f\x7a\x20\xe0\x3b\xd2\x7a\x20\x2e\x20\x2e\x20\x2e\x20\x2e"
+"\x20\x8a\x89\xb4\x81\xae\xba\x20\xdc\xd1\x8a\xa1\x20\xdc\xde\x9f"
+"\x89\xdc\xc2\x8b\x7a\x20\xf1\x67\xf1\x62\xf5\x49\xed\xfc\xf3\xe9"
+"\x8c\x61\xbb\x9a\x0a\xb5\xc1\xb2\xa1\xd2\x7a\x20\x21\x20\x21\x20"
+"\xed\x3c\xb5\x77\xdc\xd1\x20\xe0\x3b\x93\x77\x8a\xa1\x20\xd9\x69"
+"\xea\xbe\x89\xc5\x20\xb4\xf4\x93\x77\x8a\xa1\x93\x77\x20\xed\x3c"
+"\x93\x77\x96\xc1\xd2\x7a\x20\x8b\x69\xb4\x81\x97\x7a\x0a\xdc\xde"
+"\x9d\x61\x97\x41\xe2\x9c\x20\xaf\x81\xce\xa1\xae\xa1\xd2\x7a\x20"
+"\xb4\xe1\x9f\x9a\x20\xf1\x67\xf1\x62\xf5\x49\xed\xfc\xf3\xe9\xaf"
+"\x82\xdc\xef\x97\x69\xb4\x7a\x21\x21\x20\xdc\xc0\xdc\xc0\x90\x73"
+"\xd9\xbd\x20\xd9\x62\xd9\x62\x2a\x0a\x0a",
+"\xeb\x98\xa0\xeb\xb0\xa9\xea\xb0\x81\xed\x95\x98\x20\xed\x8e\xb2"
+"\xec\x8b\x9c\xec\xbd\x9c\xeb\x9d\xbc\x0a\x0a\xe3\x89\xaf\xe3\x89"
+"\xaf\xeb\x82\xa9\x21\x21\x20\xe5\x9b\xa0\xe4\xb9\x9d\xe6\x9c\x88"
+"\xed\x8c\xa8\xeb\xaf\xa4\xeb\xa6\x94\xea\xb6\x88\x20\xe2\x93\xa1"
+"\xe2\x93\x96\xed\x9b\x80\xc2\xbf\xc2\xbf\xc2\xbf\x20\xea\xb8\x8d"
+"\xeb\x92\x99\x20\xe2\x93\x94\xeb\x8e\xa8\x20\xe3\x89\xaf\x2e\x20"
+"\x2e\x0a\xe4\xba\x9e\xec\x98\x81\xe2\x93\x94\xeb\x8a\xa5\xed\x9a"
+"\xb9\x20\x2e\x20\x2e\x20\x2e\x20\x2e\x20\xec\x84\x9c\xec\x9a\xb8"
+"\xeb\xa4\x84\x20\xeb\x8e\x90\xed\x95\x99\xe4\xb9\x99\x20\xe5\xae"
+"\xb6\xed\x9b\x80\x20\x21\x20\x21\x20\x21\xe3\x85\xa0\x2e\xe3\x85"
+"\xa0\x0a\xed\x9d\x90\xed\x9d\x90\xed\x9d\x90\x20\xe3\x84\xb1\xe3"
+"\x84\xb1\xe3\x84\xb1\xe2\x98\x86\xe3\x85\xa0\x5f\xe3\x85\xa0\x20"
+"\xec\x96\xb4\xeb\xa6\xa8\x20\xed\x83\xb8\xec\xbd\xb0\xea\xb8\x90"
+"\x20\xeb\x8e\x8c\xec\x9d\x91\x20\xec\xb9\x91\xe4\xb9\x9d\xeb\x93"
+"\xa4\xe4\xb9\x99\x20\xe3\x89\xaf\xeb\x93\x9c\xea\xb8\x90\x0a\xec"
+"\x84\xa4\xeb\xa6\x8c\x20\xe5\xae\xb6\xed\x9b\x80\x20\x2e\x20\x2e"
+"\x20\x2e\x20\x2e\x20\xea\xb5\xb4\xec\x95\xa0\xec\x89\x8c\x20\xe2"
+"\x93\x94\xea\xb6\x88\x20\xe2\x93\xa1\xeb\xa6\x98\xe3\x89\xb1\xea"
+"\xb8\x90\x20\xe5\x9b\xa0\xe4\xbb\x81\xe5\xb7\x9d\xef\xa6\x81\xe4"
+"\xb8\xad\xea\xb9\x8c\xec\xa6\xbc\x0a\xec\x99\x80\xec\x92\x80\xed"
+"\x9b\x80\x20\x21\x20\x21\x20\xe4\xba\x9e\xec\x98\x81\xe2\x93\x94"
+"\x20\xe5\xae\xb6\xeb\x8a\xa5\xea\xb6\x88\x20\xe2\x98\x86\xe4\xb8"
+"\x8a\xea\xb4\x80\x20\xec\x97\x86\xeb\x8a\xa5\xea\xb6\x88\xeb\x8a"
+"\xa5\x20\xe4\xba\x9e\xeb\x8a\xa5\xeb\x92\x88\xed\x9b\x80\x20\xea"
+"\xb8\x80\xec\x95\xa0\xeb\x93\xb4\x0a\xe2\x93\xa1\xeb\xa0\xa4\xeb"
+"\x93\x80\xe4\xb9\x9d\x20\xec\x8b\x80\xed\x92\x94\xec\x88\xb4\xed"
+"\x9b\x80\x20\xec\x96\xb4\xeb\xa6\xa8\x20\xe5\x9b\xa0\xe4\xbb\x81"
+"\xe5\xb7\x9d\xef\xa6\x81\xe4\xb8\xad\xec\x8b\x81\xe2\x91\xa8\xeb"
+"\x93\xa4\xec\x95\x9c\x21\x21\x20\xe3\x89\xaf\xe3\x89\xaf\xeb\x82"
+"\xa9\xe2\x99\xa1\x20\xe2\x8c\x92\xe2\x8c\x92\x2a\x0a\x0a"),
+'shift_jis': (
+"\x50\x79\x74\x68\x6f\x6e\x20\x82\xcc\x8a\x4a\x94\xad\x82\xcd\x81"
+"\x41\x31\x39\x39\x30\x20\x94\x4e\x82\xb2\x82\xeb\x82\xa9\x82\xe7"
+"\x8a\x4a\x8e\x6e\x82\xb3\x82\xea\x82\xc4\x82\xa2\x82\xdc\x82\xb7"
+"\x81\x42\x0a\x8a\x4a\x94\xad\x8e\xd2\x82\xcc\x20\x47\x75\x69\x64"
+"\x6f\x20\x76\x61\x6e\x20\x52\x6f\x73\x73\x75\x6d\x20\x82\xcd\x8b"
+"\xb3\x88\xe7\x97\x70\x82\xcc\x83\x76\x83\x8d\x83\x4f\x83\x89\x83"
+"\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\x81\x75\x41\x42\x43\x81\x76"
+"\x82\xcc\x8a\x4a\x94\xad\x82\xc9\x8e\x51\x89\xc1\x82\xb5\x82\xc4"
+"\x82\xa2\x82\xdc\x82\xb5\x82\xbd\x82\xaa\x81\x41\x41\x42\x43\x20"
+"\x82\xcd\x8e\xc0\x97\x70\x8f\xe3\x82\xcc\x96\xda\x93\x49\x82\xc9"
+"\x82\xcd\x82\xa0\x82\xdc\x82\xe8\x93\x4b\x82\xb5\x82\xc4\x82\xa2"
+"\x82\xdc\x82\xb9\x82\xf1\x82\xc5\x82\xb5\x82\xbd\x81\x42\x0a\x82"
+"\xb1\x82\xcc\x82\xbd\x82\xdf\x81\x41\x47\x75\x69\x64\x6f\x20\x82"
+"\xcd\x82\xe6\x82\xe8\x8e\xc0\x97\x70\x93\x49\x82\xc8\x83\x76\x83"
+"\x8d\x83\x4f\x83\x89\x83\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\x82"
+"\xcc\x8a\x4a\x94\xad\x82\xf0\x8a\x4a\x8e\x6e\x82\xb5\x81\x41\x89"
+"\x70\x8d\x91\x20\x42\x42\x53\x20\x95\xfa\x91\x97\x82\xcc\x83\x52"
+"\x83\x81\x83\x66\x83\x42\x94\xd4\x91\x67\x81\x75\x83\x82\x83\x93"
+"\x83\x65\x83\x42\x20\x83\x70\x83\x43\x83\x5c\x83\x93\x81\x76\x82"
+"\xcc\x83\x74\x83\x40\x83\x93\x82\xc5\x82\xa0\x82\xe9\x20\x47\x75"
+"\x69\x64\x6f\x20\x82\xcd\x82\xb1\x82\xcc\x8c\xbe\x8c\xea\x82\xf0"
+"\x81\x75\x50\x79\x74\x68\x6f\x6e\x81\x76\x82\xc6\x96\xbc\x82\xc3"
+"\x82\xaf\x82\xdc\x82\xb5\x82\xbd\x81\x42\x0a\x82\xb1\x82\xcc\x82"
+"\xe6\x82\xa4\x82\xc8\x94\x77\x8c\x69\x82\xa9\x82\xe7\x90\xb6\x82"
+"\xdc\x82\xea\x82\xbd\x20\x50\x79\x74\x68\x6f\x6e\x20\x82\xcc\x8c"
+"\xbe\x8c\xea\x90\xdd\x8c\x76\x82\xcd\x81\x41\x81\x75\x83\x56\x83"
+"\x93\x83\x76\x83\x8b\x81\x76\x82\xc5\x81\x75\x8f\x4b\x93\xbe\x82"
+"\xaa\x97\x65\x88\xd5\x81\x76\x82\xc6\x82\xa2\x82\xa4\x96\xda\x95"
+"\x57\x82\xc9\x8f\x64\x93\x5f\x82\xaa\x92\x75\x82\xa9\x82\xea\x82"
+"\xc4\x82\xa2\x82\xdc\x82\xb7\x81\x42\x0a\x91\xbd\x82\xad\x82\xcc"
+"\x83\x58\x83\x4e\x83\x8a\x83\x76\x83\x67\x8c\x6e\x8c\xbe\x8c\xea"
+"\x82\xc5\x82\xcd\x83\x86\x81\x5b\x83\x55\x82\xcc\x96\xda\x90\xe6"
+"\x82\xcc\x97\x98\x95\xd6\x90\xab\x82\xf0\x97\x44\x90\xe6\x82\xb5"
+"\x82\xc4\x90\x46\x81\x58\x82\xc8\x8b\x40\x94\x5c\x82\xf0\x8c\xbe"
+"\x8c\xea\x97\x76\x91\x66\x82\xc6\x82\xb5\x82\xc4\x8e\xe6\x82\xe8"
+"\x93\xfc\x82\xea\x82\xe9\x8f\xea\x8d\x87\x82\xaa\x91\xbd\x82\xa2"
+"\x82\xcc\x82\xc5\x82\xb7\x82\xaa\x81\x41\x50\x79\x74\x68\x6f\x6e"
+"\x20\x82\xc5\x82\xcd\x82\xbb\x82\xa4\x82\xa2\x82\xc1\x82\xbd\x8f"
+"\xac\x8d\xd7\x8d\x48\x82\xaa\x92\xc7\x89\xc1\x82\xb3\x82\xea\x82"
+"\xe9\x82\xb1\x82\xc6\x82\xcd\x82\xa0\x82\xdc\x82\xe8\x82\xa0\x82"
+"\xe8\x82\xdc\x82\xb9\x82\xf1\x81\x42\x0a\x8c\xbe\x8c\xea\x8e\xa9"
+"\x91\xcc\x82\xcc\x8b\x40\x94\x5c\x82\xcd\x8d\xc5\x8f\xac\x8c\xc0"
+"\x82\xc9\x89\x9f\x82\xb3\x82\xa6\x81\x41\x95\x4b\x97\x76\x82\xc8"
+"\x8b\x40\x94\x5c\x82\xcd\x8a\x67\x92\xa3\x83\x82\x83\x57\x83\x85"
+"\x81\x5b\x83\x8b\x82\xc6\x82\xb5\x82\xc4\x92\xc7\x89\xc1\x82\xb7"
+"\x82\xe9\x81\x41\x82\xc6\x82\xa2\x82\xa4\x82\xcc\x82\xaa\x20\x50"
+"\x79\x74\x68\x6f\x6e\x20\x82\xcc\x83\x7c\x83\x8a\x83\x56\x81\x5b"
+"\x82\xc5\x82\xb7\x81\x42\x0a\x0a",
+"\x50\x79\x74\x68\x6f\x6e\x20\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xaf\xe3\x80\x81\x31\x39\x39\x30\x20\xe5\xb9\xb4\xe3\x81"
+"\x94\xe3\x82\x8d\xe3\x81\x8b\xe3\x82\x89\xe9\x96\x8b\xe5\xa7\x8b"
+"\xe3\x81\x95\xe3\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3"
+"\x81\x99\xe3\x80\x82\x0a\xe9\x96\x8b\xe7\x99\xba\xe8\x80\x85\xe3"
+"\x81\xae\x20\x47\x75\x69\x64\x6f\x20\x76\x61\x6e\x20\x52\x6f\x73"
+"\x73\x75\x6d\x20\xe3\x81\xaf\xe6\x95\x99\xe8\x82\xb2\xe7\x94\xa8"
+"\xe3\x81\xae\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83\xa9\xe3"
+"\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e\xe3\x80"
+"\x8c\x41\x42\x43\xe3\x80\x8d\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xab\xe5\x8f\x82\xe5\x8a\xa0\xe3\x81\x97\xe3\x81\xa6\xe3"
+"\x81\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x81\x8c\xe3\x80"
+"\x81\x41\x42\x43\x20\xe3\x81\xaf\xe5\xae\x9f\xe7\x94\xa8\xe4\xb8"
+"\x8a\xe3\x81\xae\xe7\x9b\xae\xe7\x9a\x84\xe3\x81\xab\xe3\x81\xaf"
+"\xe3\x81\x82\xe3\x81\xbe\xe3\x82\x8a\xe9\x81\xa9\xe3\x81\x97\xe3"
+"\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93\xe3\x81"
+"\xa7\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a\xe3\x81\x93\xe3\x81"
+"\xae\xe3\x81\x9f\xe3\x82\x81\xe3\x80\x81\x47\x75\x69\x64\x6f\x20"
+"\xe3\x81\xaf\xe3\x82\x88\xe3\x82\x8a\xe5\xae\x9f\xe7\x94\xa8\xe7"
+"\x9a\x84\xe3\x81\xaa\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83"
+"\xa9\xe3\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e"
+"\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba\xe3\x82\x92\xe9\x96\x8b\xe5"
+"\xa7\x8b\xe3\x81\x97\xe3\x80\x81\xe8\x8b\xb1\xe5\x9b\xbd\x20\x42"
+"\x42\x53\x20\xe6\x94\xbe\xe9\x80\x81\xe3\x81\xae\xe3\x82\xb3\xe3"
+"\x83\xa1\xe3\x83\x87\xe3\x82\xa3\xe7\x95\xaa\xe7\xb5\x84\xe3\x80"
+"\x8c\xe3\x83\xa2\xe3\x83\xb3\xe3\x83\x86\xe3\x82\xa3\x20\xe3\x83"
+"\x91\xe3\x82\xa4\xe3\x82\xbd\xe3\x83\xb3\xe3\x80\x8d\xe3\x81\xae"
+"\xe3\x83\x95\xe3\x82\xa1\xe3\x83\xb3\xe3\x81\xa7\xe3\x81\x82\xe3"
+"\x82\x8b\x20\x47\x75\x69\x64\x6f\x20\xe3\x81\xaf\xe3\x81\x93\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe3\x82\x92\xe3\x80\x8c\x50\x79"
+"\x74\x68\x6f\x6e\xe3\x80\x8d\xe3\x81\xa8\xe5\x90\x8d\xe3\x81\xa5"
+"\xe3\x81\x91\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a"
+"\xe3\x81\x93\xe3\x81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe8"
+"\x83\x8c\xe6\x99\xaf\xe3\x81\x8b\xe3\x82\x89\xe7\x94\x9f\xe3\x81"
+"\xbe\xe3\x82\x8c\xe3\x81\x9f\x20\x50\x79\x74\x68\x6f\x6e\x20\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe8\xa8\xad\xe8\xa8\x88\xe3\x81"
+"\xaf\xe3\x80\x81\xe3\x80\x8c\xe3\x82\xb7\xe3\x83\xb3\xe3\x83\x97"
+"\xe3\x83\xab\xe3\x80\x8d\xe3\x81\xa7\xe3\x80\x8c\xe7\xbf\x92\xe5"
+"\xbe\x97\xe3\x81\x8c\xe5\xae\xb9\xe6\x98\x93\xe3\x80\x8d\xe3\x81"
+"\xa8\xe3\x81\x84\xe3\x81\x86\xe7\x9b\xae\xe6\xa8\x99\xe3\x81\xab"
+"\xe9\x87\x8d\xe7\x82\xb9\xe3\x81\x8c\xe7\xbd\xae\xe3\x81\x8b\xe3"
+"\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x99\xe3\x80"
+"\x82\x0a\xe5\xa4\x9a\xe3\x81\x8f\xe3\x81\xae\xe3\x82\xb9\xe3\x82"
+"\xaf\xe3\x83\xaa\xe3\x83\x97\xe3\x83\x88\xe7\xb3\xbb\xe8\xa8\x80"
+"\xe8\xaa\x9e\xe3\x81\xa7\xe3\x81\xaf\xe3\x83\xa6\xe3\x83\xbc\xe3"
+"\x82\xb6\xe3\x81\xae\xe7\x9b\xae\xe5\x85\x88\xe3\x81\xae\xe5\x88"
+"\xa9\xe4\xb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e5\xbc\xb5\xe3\x83"
+"\xa2\xe3\x82\xb8\xe3\x83\xa5\xe3\x83\xbc\xe3\x83\xab\xe3\x81\xa8"
+"\xe3\x81\x97\xe3\x81\xa6\xe8\xbf\xbd\xe5\x8a\xa0\xe3\x81\x99\xe3"
+"\x82\x8b\xe3\x80\x81\xe3\x81\xa8\xe3\x81\x84\xe3\x81\x86\xe3\x81"
+"\xae\xe3\x81\x8c\x20\x50\x79\x74\x68\x6f\x6e\x20\xe3\x81\xae\xe3"
+"\x83\x9d\xe3\x83\xaa\xe3\x82\xb7\xe3\x83\xbc\xe3\x81\xa7\xe3\x81"
+"\x99\xe3\x80\x82\x0a\x0a"),
+'shift_jisx0213': (
+"\x50\x79\x74\x68\x6f\x6e\x20\x82\xcc\x8a\x4a\x94\xad\x82\xcd\x81"
+"\x41\x31\x39\x39\x30\x20\x94\x4e\x82\xb2\x82\xeb\x82\xa9\x82\xe7"
+"\x8a\x4a\x8e\x6e\x82\xb3\x82\xea\x82\xc4\x82\xa2\x82\xdc\x82\xb7"
+"\x81\x42\x0a\x8a\x4a\x94\xad\x8e\xd2\x82\xcc\x20\x47\x75\x69\x64"
+"\x6f\x20\x76\x61\x6e\x20\x52\x6f\x73\x73\x75\x6d\x20\x82\xcd\x8b"
+"\xb3\x88\xe7\x97\x70\x82\xcc\x83\x76\x83\x8d\x83\x4f\x83\x89\x83"
+"\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\x81\x75\x41\x42\x43\x81\x76"
+"\x82\xcc\x8a\x4a\x94\xad\x82\xc9\x8e\x51\x89\xc1\x82\xb5\x82\xc4"
+"\x82\xa2\x82\xdc\x82\xb5\x82\xbd\x82\xaa\x81\x41\x41\x42\x43\x20"
+"\x82\xcd\x8e\xc0\x97\x70\x8f\xe3\x82\xcc\x96\xda\x93\x49\x82\xc9"
+"\x82\xcd\x82\xa0\x82\xdc\x82\xe8\x93\x4b\x82\xb5\x82\xc4\x82\xa2"
+"\x82\xdc\x82\xb9\x82\xf1\x82\xc5\x82\xb5\x82\xbd\x81\x42\x0a\x82"
+"\xb1\x82\xcc\x82\xbd\x82\xdf\x81\x41\x47\x75\x69\x64\x6f\x20\x82"
+"\xcd\x82\xe6\x82\xe8\x8e\xc0\x97\x70\x93\x49\x82\xc8\x83\x76\x83"
+"\x8d\x83\x4f\x83\x89\x83\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\x82"
+"\xcc\x8a\x4a\x94\xad\x82\xf0\x8a\x4a\x8e\x6e\x82\xb5\x81\x41\x89"
+"\x70\x8d\x91\x20\x42\x42\x53\x20\x95\xfa\x91\x97\x82\xcc\x83\x52"
+"\x83\x81\x83\x66\x83\x42\x94\xd4\x91\x67\x81\x75\x83\x82\x83\x93"
+"\x83\x65\x83\x42\x20\x83\x70\x83\x43\x83\x5c\x83\x93\x81\x76\x82"
+"\xcc\x83\x74\x83\x40\x83\x93\x82\xc5\x82\xa0\x82\xe9\x20\x47\x75"
+"\x69\x64\x6f\x20\x82\xcd\x82\xb1\x82\xcc\x8c\xbe\x8c\xea\x82\xf0"
+"\x81\x75\x50\x79\x74\x68\x6f\x6e\x81\x76\x82\xc6\x96\xbc\x82\xc3"
+"\x82\xaf\x82\xdc\x82\xb5\x82\xbd\x81\x42\x0a\x82\xb1\x82\xcc\x82"
+"\xe6\x82\xa4\x82\xc8\x94\x77\x8c\x69\x82\xa9\x82\xe7\x90\xb6\x82"
+"\xdc\x82\xea\x82\xbd\x20\x50\x79\x74\x68\x6f\x6e\x20\x82\xcc\x8c"
+"\xbe\x8c\xea\x90\xdd\x8c\x76\x82\xcd\x81\x41\x81\x75\x83\x56\x83"
+"\x93\x83\x76\x83\x8b\x81\x76\x82\xc5\x81\x75\x8f\x4b\x93\xbe\x82"
+"\xaa\x97\x65\x88\xd5\x81\x76\x82\xc6\x82\xa2\x82\xa4\x96\xda\x95"
+"\x57\x82\xc9\x8f\x64\x93\x5f\x82\xaa\x92\x75\x82\xa9\x82\xea\x82"
+"\xc4\x82\xa2\x82\xdc\x82\xb7\x81\x42\x0a\x91\xbd\x82\xad\x82\xcc"
+"\x83\x58\x83\x4e\x83\x8a\x83\x76\x83\x67\x8c\x6e\x8c\xbe\x8c\xea"
+"\x82\xc5\x82\xcd\x83\x86\x81\x5b\x83\x55\x82\xcc\x96\xda\x90\xe6"
+"\x82\xcc\x97\x98\x95\xd6\x90\xab\x82\xf0\x97\x44\x90\xe6\x82\xb5"
+"\x82\xc4\x90\x46\x81\x58\x82\xc8\x8b\x40\x94\x5c\x82\xf0\x8c\xbe"
+"\x8c\xea\x97\x76\x91\x66\x82\xc6\x82\xb5\x82\xc4\x8e\xe6\x82\xe8"
+"\x93\xfc\x82\xea\x82\xe9\x8f\xea\x8d\x87\x82\xaa\x91\xbd\x82\xa2"
+"\x82\xcc\x82\xc5\x82\xb7\x82\xaa\x81\x41\x50\x79\x74\x68\x6f\x6e"
+"\x20\x82\xc5\x82\xcd\x82\xbb\x82\xa4\x82\xa2\x82\xc1\x82\xbd\x8f"
+"\xac\x8d\xd7\x8d\x48\x82\xaa\x92\xc7\x89\xc1\x82\xb3\x82\xea\x82"
+"\xe9\x82\xb1\x82\xc6\x82\xcd\x82\xa0\x82\xdc\x82\xe8\x82\xa0\x82"
+"\xe8\x82\xdc\x82\xb9\x82\xf1\x81\x42\x0a\x8c\xbe\x8c\xea\x8e\xa9"
+"\x91\xcc\x82\xcc\x8b\x40\x94\x5c\x82\xcd\x8d\xc5\x8f\xac\x8c\xc0"
+"\x82\xc9\x89\x9f\x82\xb3\x82\xa6\x81\x41\x95\x4b\x97\x76\x82\xc8"
+"\x8b\x40\x94\x5c\x82\xcd\x8a\x67\x92\xa3\x83\x82\x83\x57\x83\x85"
+"\x81\x5b\x83\x8b\x82\xc6\x82\xb5\x82\xc4\x92\xc7\x89\xc1\x82\xb7"
+"\x82\xe9\x81\x41\x82\xc6\x82\xa2\x82\xa4\x82\xcc\x82\xaa\x20\x50"
+"\x79\x74\x68\x6f\x6e\x20\x82\xcc\x83\x7c\x83\x8a\x83\x56\x81\x5b"
+"\x82\xc5\x82\xb7\x81\x42\x0a\x0a\x83\x6d\x82\xf5\x20\x83\x9e\x20"
+"\x83\x67\x83\x4c\x88\x4b\x88\x79\x20\x98\x83\xfc\xd6\x20\xfc\xd2"
+"\xfc\xe6\xfb\xd4\x0a",
+"\x50\x79\x74\x68\x6f\x6e\x20\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xaf\xe3\x80\x81\x31\x39\x39\x30\x20\xe5\xb9\xb4\xe3\x81"
+"\x94\xe3\x82\x8d\xe3\x81\x8b\xe3\x82\x89\xe9\x96\x8b\xe5\xa7\x8b"
+"\xe3\x81\x95\xe3\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3"
+"\x81\x99\xe3\x80\x82\x0a\xe9\x96\x8b\xe7\x99\xba\xe8\x80\x85\xe3"
+"\x81\xae\x20\x47\x75\x69\x64\x6f\x20\x76\x61\x6e\x20\x52\x6f\x73"
+"\x73\x75\x6d\x20\xe3\x81\xaf\xe6\x95\x99\xe8\x82\xb2\xe7\x94\xa8"
+"\xe3\x81\xae\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83\xa9\xe3"
+"\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e\xe3\x80"
+"\x8c\x41\x42\x43\xe3\x80\x8d\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba"
+"\xe3\x81\xab\xe5\x8f\x82\xe5\x8a\xa0\xe3\x81\x97\xe3\x81\xa6\xe3"
+"\x81\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x81\x8c\xe3\x80"
+"\x81\x41\x42\x43\x20\xe3\x81\xaf\xe5\xae\x9f\xe7\x94\xa8\xe4\xb8"
+"\x8a\xe3\x81\xae\xe7\x9b\xae\xe7\x9a\x84\xe3\x81\xab\xe3\x81\xaf"
+"\xe3\x81\x82\xe3\x81\xbe\xe3\x82\x8a\xe9\x81\xa9\xe3\x81\x97\xe3"
+"\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x9b\xe3\x82\x93\xe3\x81"
+"\xa7\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a\xe3\x81\x93\xe3\x81"
+"\xae\xe3\x81\x9f\xe3\x82\x81\xe3\x80\x81\x47\x75\x69\x64\x6f\x20"
+"\xe3\x81\xaf\xe3\x82\x88\xe3\x82\x8a\xe5\xae\x9f\xe7\x94\xa8\xe7"
+"\x9a\x84\xe3\x81\xaa\xe3\x83\x97\xe3\x83\xad\xe3\x82\xb0\xe3\x83"
+"\xa9\xe3\x83\x9f\xe3\x83\xb3\xe3\x82\xb0\xe8\xa8\x80\xe8\xaa\x9e"
+"\xe3\x81\xae\xe9\x96\x8b\xe7\x99\xba\xe3\x82\x92\xe9\x96\x8b\xe5"
+"\xa7\x8b\xe3\x81\x97\xe3\x80\x81\xe8\x8b\xb1\xe5\x9b\xbd\x20\x42"
+"\x42\x53\x20\xe6\x94\xbe\xe9\x80\x81\xe3\x81\xae\xe3\x82\xb3\xe3"
+"\x83\xa1\xe3\x83\x87\xe3\x82\xa3\xe7\x95\xaa\xe7\xb5\x84\xe3\x80"
+"\x8c\xe3\x83\xa2\xe3\x83\xb3\xe3\x83\x86\xe3\x82\xa3\x20\xe3\x83"
+"\x91\xe3\x82\xa4\xe3\x82\xbd\xe3\x83\xb3\xe3\x80\x8d\xe3\x81\xae"
+"\xe3\x83\x95\xe3\x82\xa1\xe3\x83\xb3\xe3\x81\xa7\xe3\x81\x82\xe3"
+"\x82\x8b\x20\x47\x75\x69\x64\x6f\x20\xe3\x81\xaf\xe3\x81\x93\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe3\x82\x92\xe3\x80\x8c\x50\x79"
+"\x74\x68\x6f\x6e\xe3\x80\x8d\xe3\x81\xa8\xe5\x90\x8d\xe3\x81\xa5"
+"\xe3\x81\x91\xe3\x81\xbe\xe3\x81\x97\xe3\x81\x9f\xe3\x80\x82\x0a"
+"\xe3\x81\x93\xe3\x81\xae\xe3\x82\x88\xe3\x81\x86\xe3\x81\xaa\xe8"
+"\x83\x8c\xe6\x99\xaf\xe3\x81\x8b\xe3\x82\x89\xe7\x94\x9f\xe3\x81"
+"\xbe\xe3\x82\x8c\xe3\x81\x9f\x20\x50\x79\x74\x68\x6f\x6e\x20\xe3"
+"\x81\xae\xe8\xa8\x80\xe8\xaa\x9e\xe8\xa8\xad\xe8\xa8\x88\xe3\x81"
+"\xaf\xe3\x80\x81\xe3\x80\x8c\xe3\x82\xb7\xe3\x83\xb3\xe3\x83\x97"
+"\xe3\x83\xab\xe3\x80\x8d\xe3\x81\xa7\xe3\x80\x8c\xe7\xbf\x92\xe5"
+"\xbe\x97\xe3\x81\x8c\xe5\xae\xb9\xe6\x98\x93\xe3\x80\x8d\xe3\x81"
+"\xa8\xe3\x81\x84\xe3\x81\x86\xe7\x9b\xae\xe6\xa8\x99\xe3\x81\xab"
+"\xe9\x87\x8d\xe7\x82\xb9\xe3\x81\x8c\xe7\xbd\xae\xe3\x81\x8b\xe3"
+"\x82\x8c\xe3\x81\xa6\xe3\x81\x84\xe3\x81\xbe\xe3\x81\x99\xe3\x80"
+"\x82\x0a\xe5\xa4\x9a\xe3\x81\x8f\xe3\x81\xae\xe3\x82\xb9\xe3\x82"
+"\xaf\xe3\x83\xaa\xe3\x83\x97\xe3\x83\x88\xe7\xb3\xbb\xe8\xa8\x80"
+"\xe8\xaa\x9e\xe3\x81\xa7\xe3\x81\xaf\xe3\x83\xa6\xe3\x83\xbc\xe3"
+"\x82\xb6\xe3\x81\xae\xe7\x9b\xae\xe5\x85\x88\xe3\x81\xae\xe5\x88"
+"\xa9\xe4\xbe\xbf\xe6\x80\xa7\xe3\x82\x92\xe5\x84\xaa\xe5\x85\x88"
+"\xe3\x81\x97\xe3\x81\xa6\xe8\x89\xb2\xe3\x80\x85\xe3\x81\xaa\xe6"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xbf\xbd\xe5\x8a\xa0\xe3\x81\x99\xe3"
+"\x82\x8b\xe3\x80\x81\xe3\x81\xa8\xe3\x81\x84\xe3\x81\x86\xe3\x81"
+"\xae\xe3\x81\x8c\x20\x50\x79\x74\x68\x6f\x6e\x20\xe3\x81\xae\xe3"
+"\x83\x9d\xe3\x83\xaa\xe3\x82\xb7\xe3\x83\xbc\xe3\x81\xa7\xe3\x81"
+"\x99\xe3\x80\x82\x0a\x0a\xe3\x83\x8e\xe3\x81\x8b\xe3\x82\x9a\x20"
+"\xe3\x83\x88\xe3\x82\x9a\x20\xe3\x83\x88\xe3\x82\xad\xef\xa8\xb6"
+"\xef\xa8\xb9\x20\xf0\xa1\x9a\xb4\xf0\xaa\x8e\x8c\x20\xe9\xba\x80"
+"\xe9\xbd\x81\xf0\xa9\x9b\xb0\x0a"),
+}
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 34213ec..1d4eaec 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -549,6 +549,10 @@ def printlist(x, width=70, indent=4):
# test_timeout
# Controlled by test_timeout.skip_expected. Requires the network
# resource and a socket module.
+# test_codecmaps_*
+# Whether a skip is expected here depends on whether a large test
+# input file has been downloaded. test_codecmaps_*.skip_expected
+# controls that.
_expectations = {
'win32':
@@ -565,7 +569,6 @@ _expectations = {
test_curses
test_dbm
test_dl
- test_email_codecs
test_fcntl
test_fork1
test_gdbm
@@ -598,7 +601,6 @@ _expectations = {
test_cl
test_curses
test_dl
- test_email_codecs
test_gl
test_imgfile
test_largefile
@@ -623,7 +625,6 @@ _expectations = {
test_curses
test_dbm
test_dl
- test_email_codecs
test_fcntl
test_fork1
test_gl
@@ -778,7 +779,6 @@ _expectations = {
test_cl
test_curses
test_dl
- test_email_codecs
test_gdbm
test_gl
test_imgfile
@@ -803,7 +803,6 @@ _expectations = {
test_cl
test_curses
test_dbm
- test_email_codecs
test_gdbm
test_gl
test_gzip
@@ -850,7 +849,6 @@ _expectations = {
test_cl
test_curses
test_dl
- test_email_codecs
test_gdbm
test_gl
test_imgfile
@@ -876,7 +874,6 @@ _expectations = {
test_cl
test_curses
test_dbm
- test_email_codecs
test_gl
test_imgfile
test_ioctl
@@ -901,7 +898,6 @@ _expectations = {
test_commands
test_curses
test_dl
- test_email_codecs
test_gl
test_imgfile
test_largefile
@@ -925,7 +921,6 @@ _expectations = {
test_bsddb3
test_cd
test_cl
- test_email_codecs
test_gl
test_imgfile
test_linuxaudiodev
@@ -955,6 +950,8 @@ class _ExpectedSkips:
from test import test_normalization
from test import test_socket_ssl
from test import test_timeout
+ from test import test_codecmaps_cn, test_codecmaps_jp
+ from test import test_codecmaps_kr, test_codecmaps_tw
self.valid = False
if sys.platform in _expectations:
@@ -973,6 +970,10 @@ class _ExpectedSkips:
if test_timeout.skip_expected:
self.expected.add('test_timeout')
+ for cc in ('cn', 'jp', 'kr', 'tw'):
+ if eval('test_codecmaps_' + cc).skip_expected:
+ self.expected.add('test_codecmaps_' + cc)
+
if not sys.platform in ("mac", "darwin"):
MAC_ONLY = ["test_macostools", "test_macfs", "test_aepack",
"test_plistlib", "test_scriptpackages"]
diff --git a/Lib/test/test_codecencodings_cn.py b/Lib/test/test_codecencodings_cn.py
new file mode 100644
index 0000000..3960c9c
--- /dev/null
+++ b/Lib/test/test_codecencodings_cn.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+#
+# test_codecencodings_cn.py
+# Codec encoding tests for PRC encodings.
+#
+# $CJKCodecs: test_codecencodings_cn.py,v 1.1 2003/12/19 03:00:05 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class Test_GB2312(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'gb2312'
+ tstring = test_multibytecodec_support.load_teststring('gb2312')
+ codectests = (
+ # invalid bytes
+ ("abc\x81\x81\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x81\x81\xc1\xc4", "replace", u"abc\ufffd\u804a"),
+ ("abc\x81\x81\xc1\xc4\xc8", "replace", u"abc\ufffd\u804a\ufffd"),
+ ("abc\x81\x81\xc1\xc4", "ignore", u"abc\u804a"),
+ ("\xc1\x64", "strict", None),
+ )
+
+class Test_GBK(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'gbk'
+ tstring = test_multibytecodec_support.load_teststring('gbk')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u804a"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u804a\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u804a"),
+ ("\x83\x34\x83\x31", "strict", None),
+ )
+
+class Test_GB18030(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'gb18030'
+ tstring = test_multibytecodec_support.load_teststring('gb18030')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u804a"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u804a\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u804a"),
+ ("abc\x84\x39\x84\x39\xc1\xc4", "replace", u"abc\ufffd\u804a"),
+ )
+ has_iso10646 = True
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(Test_GB2312))
+ suite.addTest(unittest.makeSuite(Test_GBK))
+ suite.addTest(unittest.makeSuite(Test_GB18030))
+ test_support.run_suite(suite)
+
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecencodings_jp.py b/Lib/test/test_codecencodings_jp.py
new file mode 100644
index 0000000..264b6b9
--- /dev/null
+++ b/Lib/test/test_codecencodings_jp.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+#
+# test_codecencodings_jp.py
+# Codec encoding tests for Japanese encodings.
+#
+# $CJKCodecs: test_codecencodings_jp.py,v 1.2 2004/01/06 09:25:37 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class Test_CP932(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'cp932'
+ tstring = test_multibytecodec_support.load_teststring('shift_jis')
+ codectests = (
+ # invalid bytes
+ ("abc\x81\x00\x81\x00\x82\x84", "strict", None),
+ ("abc\xf8", "strict", None),
+ ("abc\x81\x00\x82\x84", "replace", u"abc\ufffd\uff44"),
+ ("abc\x81\x00\x82\x84\x88", "replace", u"abc\ufffd\uff44\ufffd"),
+ ("abc\x81\x00\x82\x84", "ignore", u"abc\uff44"),
+ # sjis vs cp932
+ ("\\\x7e", "replace", u"\\\x7e"),
+ ("\x81\x5f\x81\x61\x81\x7c", "replace", u"\uff3c\u2225\uff0d"),
+ )
+
+class Test_EUC_JISX0213(test_multibytecodec_support.TestBase,
+ unittest.TestCase):
+ encoding = 'euc_jisx0213'
+ tstring = test_multibytecodec_support.load_teststring('euc_jisx0213')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u7956"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u7956\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u7956"),
+ ("abc\x8f\x83\x83", "replace", u"abc\ufffd"),
+ ("\xc1\x64", "strict", None),
+ ("\xa1\xc0", "strict", u"\uff3c"),
+ )
+ xmlcharnametest = (
+ u"\xab\u211c\xbb = \u2329\u1234\u232a",
+ "\xa9\xa8&real;\xa9\xb2 = &lang;&#4660;&rang;"
+ )
+
+eucjp_commontests = (
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u7956"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u7956\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u7956"),
+ ("abc\x8f\x83\x83", "replace", u"abc\ufffd"),
+ ("\xc1\x64", "strict", None),
+)
+
+class Test_EUC_JP_COMPAT(test_multibytecodec_support.TestBase,
+ unittest.TestCase):
+ encoding = 'euc_jp'
+ tstring = test_multibytecodec_support.load_teststring('euc_jp')
+ codectests = eucjp_commontests + (
+ ("\xa1\xc0\\", "strict", u"\uff3c\\"),
+ (u"\xa5", "strict", "\x5c"),
+ (u"\u203e", "strict", "\x7e"),
+ )
+
+class Test_EUC_JP_STRICT(test_multibytecodec_support.TestBase,
+ unittest.TestCase):
+ encoding = 'euc_jp_strict'
+ tstring = test_multibytecodec_support.load_teststring('euc_jp')
+ codectests = eucjp_commontests + (
+ ("\xa1\xc0\\", "strict", u"\\\\"),
+ (u"\xa5", "strict", None),
+ (u"\u203e", "strict", None),
+ )
+
+shiftjis_commonenctests = (
+ ("abc\x80\x80\x82\x84", "strict", None),
+ ("abc\xf8", "strict", None),
+ ("abc\x80\x80\x82\x84", "replace", u"abc\ufffd\uff44"),
+ ("abc\x80\x80\x82\x84\x88", "replace", u"abc\ufffd\uff44\ufffd"),
+ ("abc\x80\x80\x82\x84def", "ignore", u"abc\uff44def"),
+)
+
+class Test_SJIS_COMPAT(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'shift_jis'
+ tstring = test_multibytecodec_support.load_teststring('shift_jis')
+ codectests = shiftjis_commonenctests + (
+ ("\\\x7e", "strict", u"\\\x7e"),
+ ("\x81\x5f\x81\x61\x81\x7c", "strict", u"\uff3c\u2016\u2212"),
+ )
+
+class Test_SJIS_STRICT(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'shift_jis_strict'
+ tstring = test_multibytecodec_support.load_teststring('shift_jis')
+ codectests = shiftjis_commonenctests + (
+ ("\\\x7e", "replace", u"\xa5\u203e"),
+ ("\x81\x5f\x81\x61\x81\x7c", "replace", u"\x5c\u2016\u2212"),
+ )
+
+class Test_SJISX0213(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'shift_jisx0213'
+ tstring = test_multibytecodec_support.load_teststring('shift_jisx0213')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\x82\x84", "strict", None),
+ ("abc\xf8", "strict", None),
+ ("abc\x80\x80\x82\x84", "replace", u"abc\ufffd\uff44"),
+ ("abc\x80\x80\x82\x84\x88", "replace", u"abc\ufffd\uff44\ufffd"),
+ ("abc\x80\x80\x82\x84def", "ignore", u"abc\uff44def"),
+ # sjis vs cp932
+ ("\\\x7e", "replace", u"\xa5\u203e"),
+ ("\x81\x5f\x81\x61\x81\x7c", "replace", u"\x5c\u2016\u2212"),
+ )
+ xmlcharnametest = (
+ u"\xab\u211c\xbb = \u2329\u1234\u232a",
+ "\x85G&real;\x85Q = &lang;&#4660;&rang;"
+ )
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(Test_CP932))
+ suite.addTest(unittest.makeSuite(Test_EUC_JISX0213))
+ suite.addTest(unittest.makeSuite(Test_EUC_JP_COMPAT))
+ suite.addTest(unittest.makeSuite(Test_SJIS_COMPAT))
+ if test_multibytecodec_support.__cjkcodecs__:
+ suite.addTest(unittest.makeSuite(Test_EUC_JP_STRICT))
+ suite.addTest(unittest.makeSuite(Test_SJIS_STRICT))
+ suite.addTest(unittest.makeSuite(Test_SJISX0213))
+ test_support.run_suite(suite)
+
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecencodings_kr.py b/Lib/test/test_codecencodings_kr.py
new file mode 100644
index 0000000..17615ba
--- /dev/null
+++ b/Lib/test/test_codecencodings_kr.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# test_codecencodings_kr.py
+# Codec encoding tests for ROK encodings.
+#
+# $CJKCodecs: test_codecencodings_kr.py,v 1.1 2003/12/19 03:00:06 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'cp949'
+ tstring = test_multibytecodec_support.load_teststring('cp949')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\uc894"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\uc894\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\uc894"),
+ )
+
+class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'euc_kr'
+ tstring = test_multibytecodec_support.load_teststring('euc_kr')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\uc894"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\uc894\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\uc894"),
+ )
+
+class Test_JOHAB(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'johab'
+ tstring = test_multibytecodec_support.load_teststring('johab')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\ucd27"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\ucd27\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\ucd27"),
+ )
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(Test_CP949))
+ suite.addTest(unittest.makeSuite(Test_EUCKR))
+ suite.addTest(unittest.makeSuite(Test_JOHAB))
+ test_support.run_suite(suite)
+
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecencodings_tw.py b/Lib/test/test_codecencodings_tw.py
new file mode 100644
index 0000000..3e2fa8b
--- /dev/null
+++ b/Lib/test/test_codecencodings_tw.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+#
+# test_codecencodings_tw.py
+# Codec encoding tests for ROC encodings.
+#
+# $CJKCodecs: test_codecencodings_tw.py,v 1.1 2003/12/19 03:00:06 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class Test_Big5(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'big5'
+ tstring = test_multibytecodec_support.load_teststring('big5')
+ codectests = (
+ # invalid bytes
+ ("abc\x80\x80\xc1\xc4", "strict", None),
+ ("abc\xc8", "strict", None),
+ ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u8b10"),
+ ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u8b10\ufffd"),
+ ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u8b10"),
+ )
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(Test_Big5))
+ test_support.run_suite(suite)
+
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecmaps_cn.py b/Lib/test/test_codecmaps_cn.py
new file mode 100644
index 0000000..919c81b
--- /dev/null
+++ b/Lib/test/test_codecmaps_cn.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+#
+# test_codecmaps_cn.py
+# Codec mapping tests for PRC encodings
+#
+# $CJKCodecs: test_codecmaps_cn.py,v 1.2 2004/01/17 12:47:19 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'gb2312'
+ mapfilename = 'EUC-CN.TXT'
+ mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'
+
+class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'gbk'
+ mapfilename = 'CP936.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \
+ 'MICSFT/WINDOWS/CP936.TXT'
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestGB2312Map))
+ suite.addTest(unittest.makeSuite(TestGBKMap))
+ test_support.run_suite(suite)
+
+test_multibytecodec_support.register_skip_expected(TestGB2312Map, TestGBKMap)
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecmaps_jp.py b/Lib/test/test_codecmaps_jp.py
new file mode 100644
index 0000000..ef49178
--- /dev/null
+++ b/Lib/test/test_codecmaps_jp.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+#
+# test_codecmaps_jp.py
+# Codec mapping tests for Japanese encodings
+#
+# $CJKCodecs: test_codecmaps_jp.py,v 1.2 2004/01/17 12:47:19 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class TestCP932Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'cp932'
+ mapfilename = 'CP932.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \
+ 'WINDOWS/CP932.TXT'
+ supmaps = [
+ ('\x80', u'\u0080'),
+ ('\xa0', u'\uf8f0'),
+ ('\xfd', u'\uf8f1'),
+ ('\xfe', u'\uf8f2'),
+ ('\xff', u'\uf8f3'),
+ ]
+ for i in range(0xa1, 0xe0):
+ supmaps.append((chr(i), unichr(i+0xfec0)))
+
+
+class TestEUCJPCOMPATMap(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'euc_jp'
+ mapfilename = 'EUC-JP.TXT'
+ mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-JP.TXT'
+
+
+class TestSJISCOMPATMap(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'shift_jis'
+ mapfilename = 'SHIFTJIS.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE' \
+ '/EASTASIA/JIS/SHIFTJIS.TXT'
+ pass_enctest = [
+ ('\x81_', u'\\'),
+ ]
+ pass_dectest = [
+ ('\\', u'\xa5'),
+ ('~', u'\u203e'),
+ ('\x81_', u'\\'),
+ ]
+
+
+class TestSJISSTRICTMap(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'shift_jis_strict'
+ mapfilename = 'SHIFTJIS.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE' \
+ '/EASTASIA/JIS/SHIFTJIS.TXT'
+
+
+class TestEUCJISX0213Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'euc_jisx0213'
+ mapfilename = 'EUC-JISX0213.TXT'
+ mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-JISX0213.TXT'
+
+
+class TestSJISX0213Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'shift_jisx0213'
+ mapfilename = 'SHIFT_JISX0213.TXT'
+ mapfileurl = 'http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT'
+
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestCP932Map))
+ suite.addTest(unittest.makeSuite(TestEUCJPCOMPATMap))
+ suite.addTest(unittest.makeSuite(TestSJISCOMPATMap))
+ if test_multibytecodec_support.__cjkcodecs__:
+ suite.addTest(unittest.makeSuite(TestSJISSTRICTMap))
+ suite.addTest(unittest.makeSuite(TestEUCJISX0213Map))
+ suite.addTest(unittest.makeSuite(TestSJISX0213Map))
+ test_support.run_suite(suite)
+
+test_multibytecodec_support.register_skip_expected(TestCP932Map,
+ TestEUCJPCOMPATMap, TestSJISCOMPATMap, TestEUCJISX0213Map,
+ TestSJISX0213Map)
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecmaps_kr.py b/Lib/test/test_codecmaps_kr.py
new file mode 100644
index 0000000..910396e
--- /dev/null
+++ b/Lib/test/test_codecmaps_kr.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+#
+# test_codecmaps_kr.py
+# Codec mapping tests for ROK encodings
+#
+# $CJKCodecs: test_codecmaps_kr.py,v 1.2 2004/01/17 12:47:19 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class TestCP949Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'cp949'
+ mapfilename = 'CP949.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT' \
+ '/WINDOWS/CP949.TXT'
+
+
+class TestEUCKRMap(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'euc_kr'
+ mapfilename = 'EUC-KR.TXT'
+ mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-KR.TXT'
+
+
+class TestJOHABMap(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'johab'
+ mapfilename = 'JOHAB.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/' \
+ 'KSC/JOHAB.TXT'
+ # KS X 1001 standard assigned 0x5c as WON SIGN.
+ # but, in early 90s that is the only era used johab widely,
+ # the most softwares implements it as REVERSE SOLIDUS.
+ # So, we ignore the standard here.
+ pass_enctest = [('\\', u'\u20a9')]
+ pass_dectest = [('\\', u'\u20a9')]
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestCP949Map))
+ suite.addTest(unittest.makeSuite(TestEUCKRMap))
+ suite.addTest(unittest.makeSuite(TestJOHABMap))
+ test_support.run_suite(suite)
+
+test_multibytecodec_support.register_skip_expected(TestCP949Map,
+ TestEUCKRMap, TestJOHABMap)
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_codecmaps_tw.py b/Lib/test/test_codecmaps_tw.py
new file mode 100644
index 0000000..9b28fef
--- /dev/null
+++ b/Lib/test/test_codecmaps_tw.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+#
+# test_codecmaps_tw.py
+# Codec mapping tests for ROC encodings
+#
+# $CJKCodecs: test_codecmaps_tw.py,v 1.2 2004/01/17 12:47:19 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest
+
+class TestBIG5Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'big5'
+ mapfilename = 'BIG5.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/' \
+ 'EASTASIA/OTHER/BIG5.TXT'
+
+class TestCP950Map(test_multibytecodec_support.TestBase_Mapping,
+ unittest.TestCase):
+ encoding = 'cp950'
+ mapfilename = 'CP950.TXT'
+ mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \
+ 'WINDOWS/CP950.TXT'
+ pass_enctest = [
+ ('\xa2\xcc', u'\u5341'),
+ ('\xa2\xce', u'\u5345'),
+ ]
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestBIG5Map))
+ suite.addTest(unittest.makeSuite(TestCP950Map))
+ test_support.run_suite(suite)
+
+test_multibytecodec_support.register_skip_expected(TestBIG5Map, TestCP950Map)
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
new file mode 100644
index 0000000..f686b70
--- /dev/null
+++ b/Lib/test/test_multibytecodec.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+#
+# test_multibytecodec.py
+# Unit test for multibytecodec itself
+#
+# $CJKCodecs: test_multibytecodec.py,v 1.5 2004/01/06 02:26:28 perky Exp $
+
+from test import test_support
+from test import test_multibytecodec_support
+import unittest, StringIO, codecs
+
+class Test_StreamWriter(unittest.TestCase):
+ if len(u'\U00012345') == 2: # UCS2
+ def test_gb18030(self):
+ s= StringIO.StringIO()
+ c = codecs.lookup('gb18030')[3](s)
+ c.write(u'123')
+ self.assertEqual(s.getvalue(), '123')
+ c.write(u'\U00012345')
+ self.assertEqual(s.getvalue(), '123\x907\x959')
+ c.write(u'\U00012345'[0])
+ self.assertEqual(s.getvalue(), '123\x907\x959')
+ c.write(u'\U00012345'[1] + u'\U00012345' + u'\uac00\u00ac')
+ self.assertEqual(s.getvalue(),
+ '123\x907\x959\x907\x959\x907\x959\x827\xcf5\x810\x851')
+ c.write(u'\U00012345'[0])
+ self.assertEqual(s.getvalue(),
+ '123\x907\x959\x907\x959\x907\x959\x827\xcf5\x810\x851')
+ self.assertRaises(UnicodeError, c.reset)
+ self.assertEqual(s.getvalue(),
+ '123\x907\x959\x907\x959\x907\x959\x827\xcf5\x810\x851')
+
+ # standard utf-8 codecs has broken StreamReader
+ if test_multibytecodec_support.__cjkcodecs__:
+ def test_utf_8(self):
+ s= StringIO.StringIO()
+ c = codecs.lookup('utf-8')[3](s)
+ c.write(u'123')
+ self.assertEqual(s.getvalue(), '123')
+ c.write(u'\U00012345')
+ self.assertEqual(s.getvalue(), '123\xf0\x92\x8d\x85')
+ c.write(u'\U00012345'[0])
+ self.assertEqual(s.getvalue(), '123\xf0\x92\x8d\x85')
+ c.write(u'\U00012345'[1] + u'\U00012345' + u'\uac00\u00ac')
+ self.assertEqual(s.getvalue(),
+ '123\xf0\x92\x8d\x85\xf0\x92\x8d\x85\xf0\x92\x8d\x85'
+ '\xea\xb0\x80\xc2\xac')
+ c.write(u'\U00012345'[0])
+ self.assertEqual(s.getvalue(),
+ '123\xf0\x92\x8d\x85\xf0\x92\x8d\x85\xf0\x92\x8d\x85'
+ '\xea\xb0\x80\xc2\xac')
+ c.reset()
+ self.assertEqual(s.getvalue(),
+ '123\xf0\x92\x8d\x85\xf0\x92\x8d\x85\xf0\x92\x8d\x85'
+ '\xea\xb0\x80\xc2\xac\xed\xa0\x88')
+ c.write(u'\U00012345'[1])
+ self.assertEqual(s.getvalue(),
+ '123\xf0\x92\x8d\x85\xf0\x92\x8d\x85\xf0\x92\x8d\x85'
+ '\xea\xb0\x80\xc2\xac\xed\xa0\x88\xed\xbd\x85')
+
+ else: # UCS4
+ pass
+
+ def test_nullcoding(self):
+ self.assertEqual(''.decode('utf-8'), u'')
+ self.assertEqual(unicode('', 'utf-8'), u'')
+ self.assertEqual(u''.encode('utf-8'), '')
+
+ def test_str_decode(self):
+ self.assertEqual('abcd'.encode('utf-8'), 'abcd')
+
+def test_main():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(Test_StreamWriter))
+ test_support.run_suite(suite)
+
+if __name__ == "__main__":
+ test_main()
+
diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py
new file mode 100644
index 0000000..6185243
--- /dev/null
+++ b/Lib/test/test_multibytecodec_support.py
@@ -0,0 +1,233 @@
+#!/usr/bin/env python
+#
+# test_multibytecodec_support.py
+# Common Unittest Routines for CJK codecs
+#
+# $CJKCodecs: test_multibytecodec_support.py,v 1.5 2004/01/17 12:47:19 perky Exp $
+
+import sys, codecs, os.path
+import unittest
+from test import test_support
+from StringIO import StringIO
+
+__cjkcodecs__ = 0 # define this as 0 for python
+
+class TestBase:
+ encoding = '' # codec name
+ codec = None # codec tuple (with 4 elements)
+ tstring = '' # string to test StreamReader
+
+ codectests = None # must set. codec test tuple
+ roundtriptest = 1 # set if roundtrip is possible with unicode
+ has_iso10646 = 0 # set if this encoding contains whole iso10646 map
+ xmlcharnametest = None # string to test xmlcharrefreplace
+
+ def setUp(self):
+ if self.codec is None:
+ self.codec = codecs.lookup(self.encoding)
+ self.encode, self.decode, self.reader, self.writer = self.codec
+
+ def test_chunkcoding(self):
+ for native, utf8 in zip(*[StringIO(f).readlines()
+ for f in self.tstring]):
+ u = self.decode(native)[0]
+ self.assertEqual(u, utf8.decode('utf-8'))
+ if self.roundtriptest:
+ self.assertEqual(native, self.encode(u)[0])
+
+ def test_errorhandle(self):
+ for source, scheme, expected in self.codectests:
+ if type(source) == type(''):
+ func = self.decode
+ else:
+ func = self.encode
+ if expected:
+ result = func(source, scheme)[0]
+ self.assertEqual(result, expected)
+ else:
+ self.assertRaises(UnicodeError, func, source, scheme)
+
+ if sys.hexversion >= 0x02030000:
+ def test_xmlcharrefreplace(self):
+ if self.has_iso10646:
+ return
+
+ s = u"\u0b13\u0b23\u0b60 nd eggs"
+ self.assertEqual(
+ self.encode(s, "xmlcharrefreplace")[0],
+ "&#2835;&#2851;&#2912; nd eggs"
+ )
+
+ def test_customreplace(self):
+ if self.has_iso10646:
+ return
+
+ import htmlentitydefs
+
+ names = {}
+ for (key, value) in htmlentitydefs.entitydefs.items():
+ if len(value)==1:
+ names[value.decode('latin-1')] = self.decode(key)[0]
+ else:
+ names[unichr(int(value[2:-1]))] = self.decode(key)[0]
+
+ def xmlcharnamereplace(exc):
+ if not isinstance(exc, UnicodeEncodeError):
+ raise TypeError("don't know how to handle %r" % exc)
+ l = []
+ for c in exc.object[exc.start:exc.end]:
+ try:
+ l.append(u"&%s;" % names[c])
+ except KeyError:
+ l.append(u"&#%d;" % ord(c))
+ return (u"".join(l), exc.end)
+
+ codecs.register_error(
+ "test.xmlcharnamereplace", xmlcharnamereplace)
+
+ if self.xmlcharnametest:
+ sin, sout = self.xmlcharnametest
+ else:
+ sin = u"\xab\u211c\xbb = \u2329\u1234\u232a"
+ sout = "&laquo;&real;&raquo; = &lang;&#4660;&rang;"
+ self.assertEqual(self.encode(sin,
+ "test.xmlcharnamereplace")[0], sout)
+
+ def test_streamreader(self):
+ UTF8Writer = codecs.getwriter('utf-8')
+ for name in ["read", "readline", "readlines"]:
+ for sizehint in [None, -1] + range(1, 33) + \
+ [64, 128, 256, 512, 1024]:
+ istream = self.reader(StringIO(self.tstring[0]))
+ ostream = UTF8Writer(StringIO())
+ func = getattr(istream, name)
+ while 1:
+ data = func(sizehint)
+ if not data:
+ break
+ if name == "readlines":
+ ostream.writelines(data)
+ else:
+ ostream.write(data)
+
+ self.assertEqual(ostream.getvalue(), self.tstring[1])
+
+ def test_streamwriter(self):
+ if __cjkcodecs__:
+ readfuncs = ('read', 'readline', 'readlines')
+ else:
+ # standard utf8 codec has broken readline and readlines.
+ readfuncs = ('read',)
+ UTF8Reader = codecs.getreader('utf-8')
+ for name in readfuncs:
+ for sizehint in [None] + range(1, 33) + \
+ [64, 128, 256, 512, 1024]:
+ istream = UTF8Reader(StringIO(self.tstring[1]))
+ ostream = self.writer(StringIO())
+ func = getattr(istream, name)
+ while 1:
+ if sizehint is not None:
+ data = func(sizehint)
+ else:
+ data = func()
+
+ if not data:
+ break
+ if name == "readlines":
+ ostream.writelines(data)
+ else:
+ ostream.write(data)
+
+ self.assertEqual(ostream.getvalue(), self.tstring[0])
+
+if len(u'\U00012345') == 2: # ucs2 build
+ _unichr = unichr
+ def unichr(v):
+ if v >= 0x10000:
+ return _unichr(0xd800 + ((v - 0x10000) >> 10)) + \
+ _unichr(0xdc00 + ((v - 0x10000) & 0x3ff))
+ else:
+ return _unichr(v)
+ _ord = ord
+ def ord(c):
+ if len(c) == 2:
+ return 0x10000 + ((_ord(c[0]) - 0xd800) << 10) + \
+ (ord(c[1]) - 0xdc00)
+ else:
+ return _ord(c)
+
+class TestBase_Mapping(unittest.TestCase):
+ pass_enctest = []
+ pass_dectest = []
+ supmaps = []
+
+ def __init__(self, *args, **kw):
+ unittest.TestCase.__init__(self, *args, **kw)
+ if not os.path.exists(self.mapfilename):
+ raise test_support.TestSkipped('%s not found, download from %s' %
+ (self.mapfilename, self.mapfileurl))
+
+ def test_mapping_file(self):
+ unichrs = lambda s: u''.join(map(unichr, map(eval, s.split('+'))))
+ urt_wa = {}
+
+ for line in open(self.mapfilename):
+ if not line:
+ break
+ data = line.split('#')[0].strip().split()
+ if len(data) != 2:
+ continue
+
+ csetval = eval(data[0])
+ if csetval <= 0x7F:
+ csetch = chr(csetval & 0xff)
+ elif csetval >= 0x1000000:
+ csetch = chr(csetval >> 24) + chr((csetval >> 16) & 0xff) + \
+ chr((csetval >> 8) & 0xff) + chr(csetval & 0xff)
+ elif csetval >= 0x10000:
+ csetch = chr(csetval >> 16) + \
+ chr((csetval >> 8) & 0xff) + chr(csetval & 0xff)
+ elif csetval >= 0x100:
+ csetch = chr(csetval >> 8) + chr(csetval & 0xff)
+ else:
+ continue
+
+ unich = unichrs(data[1])
+ if ord(unich) == 0xfffd or urt_wa.has_key(unich):
+ continue
+ urt_wa[unich] = csetch
+
+ self._testpoint(csetch, unich)
+
+ def test_mapping_supplemental(self):
+ for mapping in self.supmaps:
+ self._testpoint(*mapping)
+
+ def _testpoint(self, csetch, unich):
+ if (csetch, unich) not in self.pass_enctest:
+ self.assertEqual(unich.encode(self.encoding), csetch)
+ if (csetch, unich) not in self.pass_dectest:
+ self.assertEqual(unicode(csetch, self.encoding), unich)
+
+def load_teststring(encoding):
+ if __cjkcodecs__:
+ etxt = open(os.path.join('sampletexts', encoding) + '.txt').read()
+ utxt = open(os.path.join('sampletexts', encoding) + '.utf8').read()
+ return (etxt, utxt)
+ else:
+ from test import cjkencodings_test
+ return cjkencodings_test.teststring[encoding]
+
+def register_skip_expected(*cases):
+ for case in cases: # len(cases) must be 1 at least.
+ for path in [os.path.curdir, os.path.pardir]:
+ fn = os.path.join(path, case.mapfilename)
+ if os.path.exists(fn):
+ case.mapfilename = fn
+ break
+ else:
+ sys.modules[case.__module__].skip_expected = True
+ break
+ else:
+ sys.modules[case.__module__].skip_expected = False
+