[Python-checkins] python/dist/src/Lib/encodings big5.py, NONE, 1.1 cp932.py, NONE, 1.1 cp949.py, NONE, 1.1 cp950.py, NONE, 1.1 euc_jisx0213.py, NONE, 1.1 euc_jp.py, NONE, 1.1 euc_kr.py, NONE, 1.1 gb18030.py, NONE, 1.1 gb2312.py, NONE, 1.1 gbk.py, NONE, 1.1 hz.py, NONE, 1.1 iso2022_jp.py, NONE, 1.1 iso2022_jp_1.py, NONE, 1.1 iso2022_jp_2.py, NONE, 1.1 iso2022_jp_3.py, NONE, 1.1 iso2022_jp_ext.py, NONE, 1.1 iso2022_kr.py, NONE, 1.1 johab.py, NONE, 1.1 shift_jis.py, NONE, 1.1 shift_jisx0213.py, NONE, 1.1 aliases.py, 1.20, 1.21

perky at users.sourceforge.net perky at users.sourceforge.net
Sat Jan 17 09:29:30 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/encodings
In directory sc8-pr-cvs1:/tmp/cvs-serv14239/Lib/encodings

Modified Files:
	aliases.py 
Added Files:
	big5.py cp932.py cp949.py cp950.py euc_jisx0213.py euc_jp.py 
	euc_kr.py gb18030.py gb2312.py gbk.py hz.py iso2022_jp.py 
	iso2022_jp_1.py iso2022_jp_2.py iso2022_jp_3.py 
	iso2022_jp_ext.py iso2022_kr.py johab.py shift_jis.py 
	shift_jisx0213.py 
Log Message:
Add CJK codecs support as discussed on python-dev. (SF #873597)

Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!


--- NEW FILE: big5.py ---
#
# big5.py: Python Unicode Codec for BIG5
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: cp932.py ---
#
# cp932.py: Python Unicode Codec for CP932
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: cp949.py ---
#
# cp949.py: Python Unicode Codec for CP949
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: cp950.py ---
#
# cp950.py: Python Unicode Codec for CP950
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: euc_jisx0213.py ---
#
# euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: euc_jp.py ---
#
# euc_jp.py: Python Unicode Codec for EUC_JP
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: euc_kr.py ---
#
# euc_kr.py: Python Unicode Codec for EUC_KR
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: gb18030.py ---
#
# gb18030.py: Python Unicode Codec for GB18030
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: gb2312.py ---
#
# gb2312.py: Python Unicode Codec for GB2312
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: gbk.py ---
#
# gbk.py: Python Unicode Codec for GBK
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: hz.py ---
#
# hz.py: Python Unicode Codec for HZ
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: iso2022_jp.py ---
#
# iso2022_jp.py: Python Unicode Codec for ISO_2022_JP
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: iso2022_jp_1.py ---
#
# iso2022_jp_1.py: Python Unicode Codec for ISO_2022_JP_1
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: iso2022_jp_2.py ---
#
# iso2022_jp_2.py: Python Unicode Codec for ISO_2022_JP_2
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: iso2022_jp_3.py ---
#
# iso2022_jp_3.py: Python Unicode Codec for ISO_2022_JP_3
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: iso2022_jp_ext.py ---
#
# iso2022_jp_ext.py: Python Unicode Codec for ISO_2022_JP_EXT
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: iso2022_kr.py ---
#
# iso2022_kr.py: Python Unicode Codec for ISO_2022_KR
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: johab.py ---
#
# johab.py: Python Unicode Codec for JOHAB
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: shift_jis.py ---
#
# shift_jis.py: Python Unicode Codec for SHIFT_JIS
#
# Written by Hye-Shik Chang <perky at 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)


--- NEW FILE: shift_jisx0213.py ---
#
# shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213
#
# Written by Hye-Shik Chang <perky at 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)


Index: aliases.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/aliases.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** aliases.py	23 Sep 2003 20:21:01 -0000	1.20
--- aliases.py	17 Jan 2004 14:29:28 -0000	1.21
***************
*** 15,24 ****
          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 = {
--- 15,18 ----
***************
*** 42,45 ****
--- 36,43 ----
      'base_64'            : 'base64_codec',
  
+     # big5 codec
+     'big5_tw'            : 'big5',
+     'csbig5'             : 'big5',
+ 
      # bz2_codec codec
      'bz2'                : 'bz2_codec',
***************
*** 169,175 ****
--- 167,255 ----
      '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',
***************
*** 259,265 ****
      'latin5'             : 'iso8859_9',
  
!     # jis_7 codec
!     'csiso2022jp'        : 'jis_7',
!     'iso_2022_jp'        : 'jis_7',
  
      # koi8_r codec
--- 339,345 ----
      'latin5'             : 'iso8859_9',
  
!     # johab codec
!     'cp1361'             : 'johab',
!     'ms1361'             : 'johab',
  
      # koi8_r codec
***************
*** 309,312 ****
--- 389,403 ----
      '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',





More information about the Python-checkins mailing list