PyXR

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



0001 """ Python Character Mapping Codec generated from '8859-9.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         0x00d0: 0x011e, #       LATIN CAPITAL LETTER G WITH BREVE
0041         0x00dd: 0x0130, #       LATIN CAPITAL LETTER I WITH DOT ABOVE
0042         0x00de: 0x015e, #       LATIN CAPITAL LETTER S WITH CEDILLA
0043         0x00f0: 0x011f, #       LATIN SMALL LETTER G WITH BREVE
0044         0x00fd: 0x0131, #       LATIN SMALL LETTER DOTLESS I
0045         0x00fe: 0x015f, #       LATIN SMALL LETTER S WITH CEDILLA
0046 })
0047 
0048 ### Encoding Map
0049 
0050 encoding_map = codecs.make_encoding_map(decoding_map)
0051 

Generated by PyXR 0.9.4
SourceForge.net Logo