Issue #7632: Fix a serious wrong output bug for string -> float conversion.
[python.git] / Lib / encodings / euc_jp.py
blob7bcbe4147f2ad49c6a0d3a9cc6eb5417cdabdf2d
2 # euc_jp.py: Python Unicode Codec for EUC_JP
4 # Written by Hye-Shik Chang <perky@FreeBSD.org>
7 import _codecs_jp, codecs
8 import _multibytecodec as mbc
10 codec = _codecs_jp.getcodec('euc_jp')
12 class Codec(codecs.Codec):
13 encode = codec.encode
14 decode = codec.decode
16 class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
17 codecs.IncrementalEncoder):
18 codec = codec
20 class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
21 codecs.IncrementalDecoder):
22 codec = codec
24 class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
25 codec = codec
27 class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
28 codec = codec
30 def getregentry():
31 return codecs.CodecInfo(
32 name='euc_jp',
33 encode=Codec().encode,
34 decode=Codec().decode,
35 incrementalencoder=IncrementalEncoder,
36 incrementaldecoder=IncrementalDecoder,
37 streamreader=StreamReader,
38 streamwriter=StreamWriter,