summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/gb18030.py
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2004-07-18 03:06:29 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2004-07-18 03:06:29 (GMT)
commit2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421 (patch)
treeebd4c873cfc841dc978053941b2859d4efbd9082 /Lib/encodings/gb18030.py
parent264c659197bcd2fc3e22776fc711f31b953daae5 (diff)
downloadcpython-2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421.zip
cpython-2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421.tar.gz
cpython-2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421.tar.bz2
Bring CJKCodecs 1.1 into trunk. This completely reorganizes source
and installed layouts to make maintenance simple and easy. And it also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004 and iso2022-jp-2004.
Diffstat (limited to 'Lib/encodings/gb18030.py')
-rw-r--r--Lib/encodings/gb18030.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/encodings/gb18030.py b/Lib/encodings/gb18030.py
index f628af3..7eca319 100644
--- a/Lib/encodings/gb18030.py
+++ b/Lib/encodings/gb18030.py
@@ -2,11 +2,12 @@
# 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 $
+# $CJKCodecs: gb18030.py,v 1.8 2004/06/28 18:16:03 perky Exp $
#
-from _codecs_gb18030 import codec
-import codecs
+import _codecs_cn, codecs
+
+codec = _codecs_cn.getcodec('gb18030')
class Codec(codecs.Codec):
encode = codec.encode
@@ -30,4 +31,4 @@ class StreamWriter(Codec, codecs.StreamWriter):
self.reset = __codec.reset
def getregentry():
- return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
+ return (codec.encode, codec.decode, StreamReader, StreamWriter)