PyXR

c:\python24\lib \ encodings \ iso8859_15.py



0001 """ Python Character Mapping Codec generated from '8859-15.TXT' with gencodec.py.
0002 
0003 Written by Marc-Andre Lemburg (mal@lemburg.com).
0004 
0005 (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
0006 (c) Copyright 2000 Guido van Rossum.
0007 
0008 """#"
0009 
0010 import codecs
0011 
0012 ### Codec APIs
0013 
0014 class Codec(codecs.Codec):
0015 
0016     def encode(self,input,errors='strict'):
0017 
0018         return codecs.charmap_encode(input,errors,encoding_map)
0019 
0020     def decode(self,input,errors='strict'):
0021 
0022         return codecs.charmap_decode(input,errors,decoding_map)
0023 
0024 class StreamWriter(Codec,codecs.StreamWriter):
0025     pass
0026 
0027 class StreamReader(Codec,codecs.StreamReader):
0028     pass
0029 
0030 ### encodings module API
0031 
0032 def getregentry():
0033 
0034     return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
0035 
0036 ### Decoding Map
0037 
0038 decoding_map = codecs.make_identity_dict(range(256))
0039 decoding_map.update({
0040         0x00a4: 0x20ac, #       EURO SIGN
0041         0x00a6: 0x0160, #       LATIN CAPITAL LETTER S WITH CARON
0042         0x00a8: 0x0161, #       LATIN SMALL LETTER S WITH CARON
0043         0x00b4: 0x017d, #       LATIN CAPITAL LETTER Z WITH CARON
0044         0x00b8: 0x017e, #       LATIN SMALL LETTER Z WITH CARON
0045         0x00bc: 0x0152, #       LATIN CAPITAL LIGATURE OE
0046         0x00bd: 0x0153, #       LATIN SMALL LIGATURE OE
0047         0x00be: 0x0178, #       LATIN CAPITAL LETTER Y WITH DIAERESIS
0048 })
0049 
0050 ### Encoding Map
0051 
0052 encoding_map = codecs.make_encoding_map(decoding_map)
0053 

Generated by PyXR 0.9.4
SourceForge.net Logo