Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / lib / python2.4 / encodings / iso8859_16.py
CommitLineData
920dae64
AT
1""" Python Character Mapping Codec generated from '8859-16.TXT' with gencodec.py.
2
3 Generated from mapping found in
4 ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT
5
6"""#"
7
8import codecs
9
10### Codec APIs
11
12class Codec(codecs.Codec):
13
14 def encode(self,input,errors='strict'):
15
16 return codecs.charmap_encode(input,errors,encoding_map)
17
18 def decode(self,input,errors='strict'):
19
20 return codecs.charmap_decode(input,errors,decoding_map)
21
22class StreamWriter(Codec,codecs.StreamWriter):
23 pass
24
25class StreamReader(Codec,codecs.StreamReader):
26 pass
27
28### encodings module API
29
30def getregentry():
31
32 return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
33
34### Decoding Map
35
36decoding_map = codecs.make_identity_dict(range(256))
37decoding_map.update({
38 0x00a1: 0x0104, # LATIN CAPITAL LETTER A WITH OGONEK
39 0x00a2: 0x0105, # LATIN SMALL LETTER A WITH OGONEK
40 0x00a3: 0x0141, # LATIN CAPITAL LETTER L WITH STROKE
41 0x00a4: 0x20ac, # EURO SIGN
42 0x00a5: 0x201e, # DOUBLE LOW-9 QUOTATION MARK
43 0x00a6: 0x0160, # LATIN CAPITAL LETTER S WITH CARON
44 0x00a8: 0x0161, # LATIN SMALL LETTER S WITH CARON
45 0x00aa: 0x0218, # LATIN CAPITAL LETTER S WITH COMMA BELOW
46 0x00ac: 0x0179, # LATIN CAPITAL LETTER Z WITH ACUTE
47 0x00ae: 0x017a, # LATIN SMALL LETTER Z WITH ACUTE
48 0x00af: 0x017b, # LATIN CAPITAL LETTER Z WITH DOT ABOVE
49 0x00b2: 0x010c, # LATIN CAPITAL LETTER C WITH CARON
50 0x00b3: 0x0142, # LATIN SMALL LETTER L WITH STROKE
51 0x00b4: 0x017d, # LATIN CAPITAL LETTER Z WITH CARON
52 0x00b5: 0x201d, # RIGHT DOUBLE QUOTATION MARK
53 0x00b8: 0x017e, # LATIN SMALL LETTER Z WITH CARON
54 0x00b9: 0x010d, # LATIN SMALL LETTER C WITH CARON
55 0x00ba: 0x0219, # LATIN SMALL LETTER S WITH COMMA BELOW
56 0x00bc: 0x0152, # LATIN CAPITAL LIGATURE OE
57 0x00bd: 0x0153, # LATIN SMALL LIGATURE OE
58 0x00be: 0x0178, # LATIN CAPITAL LETTER Y WITH DIAERESIS
59 0x00bf: 0x017c, # LATIN SMALL LETTER Z WITH DOT ABOVE
60 0x00c3: 0x0102, # LATIN CAPITAL LETTER A WITH BREVE
61 0x00c5: 0x0106, # LATIN CAPITAL LETTER C WITH ACUTE
62 0x00d0: 0x0110, # LATIN CAPITAL LETTER D WITH STROKE
63 0x00d1: 0x0143, # LATIN CAPITAL LETTER N WITH ACUTE
64 0x00d5: 0x0150, # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
65 0x00d7: 0x015a, # LATIN CAPITAL LETTER S WITH ACUTE
66 0x00d8: 0x0170, # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
67 0x00dd: 0x0118, # LATIN CAPITAL LETTER E WITH OGONEK
68 0x00de: 0x021a, # LATIN CAPITAL LETTER T WITH COMMA BELOW
69 0x00e3: 0x0103, # LATIN SMALL LETTER A WITH BREVE
70 0x00e5: 0x0107, # LATIN SMALL LETTER C WITH ACUTE
71 0x00f0: 0x0111, # LATIN SMALL LETTER D WITH STROKE
72 0x00f1: 0x0144, # LATIN SMALL LETTER N WITH ACUTE
73 0x00f5: 0x0151, # LATIN SMALL LETTER O WITH DOUBLE ACUTE
74 0x00f7: 0x015b, # LATIN SMALL LETTER S WITH ACUTE
75 0x00f8: 0x0171, # LATIN SMALL LETTER U WITH DOUBLE ACUTE
76 0x00fd: 0x0119, # LATIN SMALL LETTER E WITH OGONEK
77 0x00fe: 0x021b, # LATIN SMALL LETTER T WITH COMMA BELOW
78})
79
80### Encoding Map
81
82encoding_map = codecs.make_encoding_map(decoding_map)