Marc-André Lemburg | 3c72ded | 2005-10-24 12:07:49 +0000 | [diff] [blame] | 1 | """ Python Character Mapping Codec generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py. |
Guido van Rossum | 0229bf6 | 2000-03-10 23:17:24 +0000 | [diff] [blame] | 2 | |
| 3 | """#" |
| 4 | |
| 5 | import codecs |
| 6 | |
| 7 | ### Codec APIs |
| 8 | |
| 9 | class Codec(codecs.Codec): |
| 10 | |
| 11 | def encode(self,input,errors='strict'): |
| 12 | |
| 13 | return codecs.charmap_encode(input,errors,encoding_map) |
Tim Peters | 469cdad | 2002-08-08 20:19:19 +0000 | [diff] [blame] | 14 | |
Guido van Rossum | 0229bf6 | 2000-03-10 23:17:24 +0000 | [diff] [blame] | 15 | def decode(self,input,errors='strict'): |
| 16 | |
Marc-André Lemburg | a1129f4 | 2005-10-21 13:49:12 +0000 | [diff] [blame] | 17 | return codecs.charmap_decode(input,errors,decoding_table) |
Tim Peters | 536cf99 | 2005-12-25 23:18:31 +0000 | [diff] [blame] | 18 | |
Guido van Rossum | 0229bf6 | 2000-03-10 23:17:24 +0000 | [diff] [blame] | 19 | class StreamWriter(Codec,codecs.StreamWriter): |
| 20 | pass |
Tim Peters | 469cdad | 2002-08-08 20:19:19 +0000 | [diff] [blame] | 21 | |
Guido van Rossum | 0229bf6 | 2000-03-10 23:17:24 +0000 | [diff] [blame] | 22 | class StreamReader(Codec,codecs.StreamReader): |
| 23 | pass |
| 24 | |
| 25 | ### encodings module API |
| 26 | |
| 27 | def getregentry(): |
| 28 | |
| 29 | return (Codec().encode,Codec().decode,StreamReader,StreamWriter) |
| 30 | |
Guido van Rossum | 0229bf6 | 2000-03-10 23:17:24 +0000 | [diff] [blame] | 31 | |
Marc-André Lemburg | a1129f4 | 2005-10-21 13:49:12 +0000 | [diff] [blame] | 32 | ### Decoding Table |
| 33 | |
| 34 | decoding_table = ( |
Tim Peters | 536cf99 | 2005-12-25 23:18:31 +0000 | [diff] [blame] | 35 | u'\x00' # 0x00 -> NULL |
| 36 | u'\x01' # 0x01 -> START OF HEADING |
| 37 | u'\x02' # 0x02 -> START OF TEXT |
| 38 | u'\x03' # 0x03 -> END OF TEXT |
| 39 | u'\x04' # 0x04 -> END OF TRANSMISSION |
| 40 | u'\x05' # 0x05 -> ENQUIRY |
| 41 | u'\x06' # 0x06 -> ACKNOWLEDGE |
| 42 | u'\x07' # 0x07 -> BELL |
| 43 | u'\x08' # 0x08 -> BACKSPACE |
| 44 | u'\t' # 0x09 -> HORIZONTAL TABULATION |
| 45 | u'\n' # 0x0A -> LINE FEED |
| 46 | u'\x0b' # 0x0B -> VERTICAL TABULATION |
| 47 | u'\x0c' # 0x0C -> FORM FEED |
| 48 | u'\r' # 0x0D -> CARRIAGE RETURN |
| 49 | u'\x0e' # 0x0E -> SHIFT OUT |
| 50 | u'\x0f' # 0x0F -> SHIFT IN |
| 51 | u'\x10' # 0x10 -> DATA LINK ESCAPE |
| 52 | u'\x11' # 0x11 -> DEVICE CONTROL ONE |
| 53 | u'\x12' # 0x12 -> DEVICE CONTROL TWO |
| 54 | u'\x13' # 0x13 -> DEVICE CONTROL THREE |
| 55 | u'\x14' # 0x14 -> DEVICE CONTROL FOUR |
| 56 | u'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE |
| 57 | u'\x16' # 0x16 -> SYNCHRONOUS IDLE |
| 58 | u'\x17' # 0x17 -> END OF TRANSMISSION BLOCK |
| 59 | u'\x18' # 0x18 -> CANCEL |
| 60 | u'\x19' # 0x19 -> END OF MEDIUM |
| 61 | u'\x1a' # 0x1A -> SUBSTITUTE |
| 62 | u'\x1b' # 0x1B -> ESCAPE |
| 63 | u'\x1c' # 0x1C -> FILE SEPARATOR |
| 64 | u'\x1d' # 0x1D -> GROUP SEPARATOR |
| 65 | u'\x1e' # 0x1E -> RECORD SEPARATOR |
| 66 | u'\x1f' # 0x1F -> UNIT SEPARATOR |
| 67 | u' ' # 0x20 -> SPACE |
| 68 | u'!' # 0x21 -> EXCLAMATION MARK |
| 69 | u'"' # 0x22 -> QUOTATION MARK |
| 70 | u'#' # 0x23 -> NUMBER SIGN |
| 71 | u'$' # 0x24 -> DOLLAR SIGN |
| 72 | u'%' # 0x25 -> PERCENT SIGN |
| 73 | u'&' # 0x26 -> AMPERSAND |
| 74 | u"'" # 0x27 -> APOSTROPHE |
| 75 | u'(' # 0x28 -> LEFT PARENTHESIS |
| 76 | u')' # 0x29 -> RIGHT PARENTHESIS |
| 77 | u'*' # 0x2A -> ASTERISK |
| 78 | u'+' # 0x2B -> PLUS SIGN |
| 79 | u',' # 0x2C -> COMMA |
| 80 | u'-' # 0x2D -> HYPHEN-MINUS |
| 81 | u'.' # 0x2E -> FULL STOP |
| 82 | u'/' # 0x2F -> SOLIDUS |
| 83 | u'0' # 0x30 -> DIGIT ZERO |
| 84 | u'1' # 0x31 -> DIGIT ONE |
| 85 | u'2' # 0x32 -> DIGIT TWO |
| 86 | u'3' # 0x33 -> DIGIT THREE |
| 87 | u'4' # 0x34 -> DIGIT FOUR |
| 88 | u'5' # 0x35 -> DIGIT FIVE |
| 89 | u'6' # 0x36 -> DIGIT SIX |
| 90 | u'7' # 0x37 -> DIGIT SEVEN |
| 91 | u'8' # 0x38 -> DIGIT EIGHT |
| 92 | u'9' # 0x39 -> DIGIT NINE |
| 93 | u':' # 0x3A -> COLON |
| 94 | u';' # 0x3B -> SEMICOLON |
| 95 | u'<' # 0x3C -> LESS-THAN SIGN |
| 96 | u'=' # 0x3D -> EQUALS SIGN |
| 97 | u'>' # 0x3E -> GREATER-THAN SIGN |
| 98 | u'?' # 0x3F -> QUESTION MARK |
| 99 | u'@' # 0x40 -> COMMERCIAL AT |
| 100 | u'A' # 0x41 -> LATIN CAPITAL LETTER A |
| 101 | u'B' # 0x42 -> LATIN CAPITAL LETTER B |
| 102 | u'C' # 0x43 -> LATIN CAPITAL LETTER C |
| 103 | u'D' # 0x44 -> LATIN CAPITAL LETTER D |
| 104 | u'E' # 0x45 -> LATIN CAPITAL LETTER E |
| 105 | u'F' # 0x46 -> LATIN CAPITAL LETTER F |
| 106 | u'G' # 0x47 -> LATIN CAPITAL LETTER G |
| 107 | u'H' # 0x48 -> LATIN CAPITAL LETTER H |
| 108 | u'I' # 0x49 -> LATIN CAPITAL LETTER I |
| 109 | u'J' # 0x4A -> LATIN CAPITAL LETTER J |
| 110 | u'K' # 0x4B -> LATIN CAPITAL LETTER K |
| 111 | u'L' # 0x4C -> LATIN CAPITAL LETTER L |
| 112 | u'M' # 0x4D -> LATIN CAPITAL LETTER M |
| 113 | u'N' # 0x4E -> LATIN CAPITAL LETTER N |
| 114 | u'O' # 0x4F -> LATIN CAPITAL LETTER O |
| 115 | u'P' # 0x50 -> LATIN CAPITAL LETTER P |
| 116 | u'Q' # 0x51 -> LATIN CAPITAL LETTER Q |
| 117 | u'R' # 0x52 -> LATIN CAPITAL LETTER R |
| 118 | u'S' # 0x53 -> LATIN CAPITAL LETTER S |
| 119 | u'T' # 0x54 -> LATIN CAPITAL LETTER T |
| 120 | u'U' # 0x55 -> LATIN CAPITAL LETTER U |
| 121 | u'V' # 0x56 -> LATIN CAPITAL LETTER V |
| 122 | u'W' # 0x57 -> LATIN CAPITAL LETTER W |
| 123 | u'X' # 0x58 -> LATIN CAPITAL LETTER X |
| 124 | u'Y' # 0x59 -> LATIN CAPITAL LETTER Y |
| 125 | u'Z' # 0x5A -> LATIN CAPITAL LETTER Z |
| 126 | u'[' # 0x5B -> LEFT SQUARE BRACKET |
| 127 | u'\\' # 0x5C -> REVERSE SOLIDUS |
| 128 | u']' # 0x5D -> RIGHT SQUARE BRACKET |
| 129 | u'^' # 0x5E -> CIRCUMFLEX ACCENT |
| 130 | u'_' # 0x5F -> LOW LINE |
| 131 | u'`' # 0x60 -> GRAVE ACCENT |
| 132 | u'a' # 0x61 -> LATIN SMALL LETTER A |
| 133 | u'b' # 0x62 -> LATIN SMALL LETTER B |
| 134 | u'c' # 0x63 -> LATIN SMALL LETTER C |
| 135 | u'd' # 0x64 -> LATIN SMALL LETTER D |
| 136 | u'e' # 0x65 -> LATIN SMALL LETTER E |
| 137 | u'f' # 0x66 -> LATIN SMALL LETTER F |
| 138 | u'g' # 0x67 -> LATIN SMALL LETTER G |
| 139 | u'h' # 0x68 -> LATIN SMALL LETTER H |
| 140 | u'i' # 0x69 -> LATIN SMALL LETTER I |
| 141 | u'j' # 0x6A -> LATIN SMALL LETTER J |
| 142 | u'k' # 0x6B -> LATIN SMALL LETTER K |
| 143 | u'l' # 0x6C -> LATIN SMALL LETTER L |
| 144 | u'm' # 0x6D -> LATIN SMALL LETTER M |
| 145 | u'n' # 0x6E -> LATIN SMALL LETTER N |
| 146 | u'o' # 0x6F -> LATIN SMALL LETTER O |
| 147 | u'p' # 0x70 -> LATIN SMALL LETTER P |
| 148 | u'q' # 0x71 -> LATIN SMALL LETTER Q |
| 149 | u'r' # 0x72 -> LATIN SMALL LETTER R |
| 150 | u's' # 0x73 -> LATIN SMALL LETTER S |
| 151 | u't' # 0x74 -> LATIN SMALL LETTER T |
| 152 | u'u' # 0x75 -> LATIN SMALL LETTER U |
| 153 | u'v' # 0x76 -> LATIN SMALL LETTER V |
| 154 | u'w' # 0x77 -> LATIN SMALL LETTER W |
| 155 | u'x' # 0x78 -> LATIN SMALL LETTER X |
| 156 | u'y' # 0x79 -> LATIN SMALL LETTER Y |
| 157 | u'z' # 0x7A -> LATIN SMALL LETTER Z |
| 158 | u'{' # 0x7B -> LEFT CURLY BRACKET |
| 159 | u'|' # 0x7C -> VERTICAL LINE |
| 160 | u'}' # 0x7D -> RIGHT CURLY BRACKET |
| 161 | u'~' # 0x7E -> TILDE |
| 162 | u'\x7f' # 0x7F -> DELETE |
| 163 | u'\u20ac' # 0x80 -> EURO SIGN |
| 164 | u'\ufffe' # 0x81 -> UNDEFINED |
| 165 | u'\u201a' # 0x82 -> SINGLE LOW-9 QUOTATION MARK |
| 166 | u'\ufffe' # 0x83 -> UNDEFINED |
| 167 | u'\u201e' # 0x84 -> DOUBLE LOW-9 QUOTATION MARK |
| 168 | u'\u2026' # 0x85 -> HORIZONTAL ELLIPSIS |
| 169 | u'\u2020' # 0x86 -> DAGGER |
| 170 | u'\u2021' # 0x87 -> DOUBLE DAGGER |
| 171 | u'\ufffe' # 0x88 -> UNDEFINED |
| 172 | u'\u2030' # 0x89 -> PER MILLE SIGN |
| 173 | u'\u0160' # 0x8A -> LATIN CAPITAL LETTER S WITH CARON |
| 174 | u'\u2039' # 0x8B -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK |
| 175 | u'\u015a' # 0x8C -> LATIN CAPITAL LETTER S WITH ACUTE |
| 176 | u'\u0164' # 0x8D -> LATIN CAPITAL LETTER T WITH CARON |
| 177 | u'\u017d' # 0x8E -> LATIN CAPITAL LETTER Z WITH CARON |
| 178 | u'\u0179' # 0x8F -> LATIN CAPITAL LETTER Z WITH ACUTE |
| 179 | u'\ufffe' # 0x90 -> UNDEFINED |
| 180 | u'\u2018' # 0x91 -> LEFT SINGLE QUOTATION MARK |
| 181 | u'\u2019' # 0x92 -> RIGHT SINGLE QUOTATION MARK |
| 182 | u'\u201c' # 0x93 -> LEFT DOUBLE QUOTATION MARK |
| 183 | u'\u201d' # 0x94 -> RIGHT DOUBLE QUOTATION MARK |
| 184 | u'\u2022' # 0x95 -> BULLET |
| 185 | u'\u2013' # 0x96 -> EN DASH |
| 186 | u'\u2014' # 0x97 -> EM DASH |
| 187 | u'\ufffe' # 0x98 -> UNDEFINED |
| 188 | u'\u2122' # 0x99 -> TRADE MARK SIGN |
| 189 | u'\u0161' # 0x9A -> LATIN SMALL LETTER S WITH CARON |
| 190 | u'\u203a' # 0x9B -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK |
| 191 | u'\u015b' # 0x9C -> LATIN SMALL LETTER S WITH ACUTE |
| 192 | u'\u0165' # 0x9D -> LATIN SMALL LETTER T WITH CARON |
| 193 | u'\u017e' # 0x9E -> LATIN SMALL LETTER Z WITH CARON |
| 194 | u'\u017a' # 0x9F -> LATIN SMALL LETTER Z WITH ACUTE |
| 195 | u'\xa0' # 0xA0 -> NO-BREAK SPACE |
| 196 | u'\u02c7' # 0xA1 -> CARON |
| 197 | u'\u02d8' # 0xA2 -> BREVE |
| 198 | u'\u0141' # 0xA3 -> LATIN CAPITAL LETTER L WITH STROKE |
| 199 | u'\xa4' # 0xA4 -> CURRENCY SIGN |
| 200 | u'\u0104' # 0xA5 -> LATIN CAPITAL LETTER A WITH OGONEK |
| 201 | u'\xa6' # 0xA6 -> BROKEN BAR |
| 202 | u'\xa7' # 0xA7 -> SECTION SIGN |
| 203 | u'\xa8' # 0xA8 -> DIAERESIS |
| 204 | u'\xa9' # 0xA9 -> COPYRIGHT SIGN |
| 205 | u'\u015e' # 0xAA -> LATIN CAPITAL LETTER S WITH CEDILLA |
| 206 | u'\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK |
| 207 | u'\xac' # 0xAC -> NOT SIGN |
| 208 | u'\xad' # 0xAD -> SOFT HYPHEN |
| 209 | u'\xae' # 0xAE -> REGISTERED SIGN |
| 210 | u'\u017b' # 0xAF -> LATIN CAPITAL LETTER Z WITH DOT ABOVE |
| 211 | u'\xb0' # 0xB0 -> DEGREE SIGN |
| 212 | u'\xb1' # 0xB1 -> PLUS-MINUS SIGN |
| 213 | u'\u02db' # 0xB2 -> OGONEK |
| 214 | u'\u0142' # 0xB3 -> LATIN SMALL LETTER L WITH STROKE |
| 215 | u'\xb4' # 0xB4 -> ACUTE ACCENT |
| 216 | u'\xb5' # 0xB5 -> MICRO SIGN |
| 217 | u'\xb6' # 0xB6 -> PILCROW SIGN |
| 218 | u'\xb7' # 0xB7 -> MIDDLE DOT |
| 219 | u'\xb8' # 0xB8 -> CEDILLA |
| 220 | u'\u0105' # 0xB9 -> LATIN SMALL LETTER A WITH OGONEK |
| 221 | u'\u015f' # 0xBA -> LATIN SMALL LETTER S WITH CEDILLA |
| 222 | u'\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK |
| 223 | u'\u013d' # 0xBC -> LATIN CAPITAL LETTER L WITH CARON |
| 224 | u'\u02dd' # 0xBD -> DOUBLE ACUTE ACCENT |
| 225 | u'\u013e' # 0xBE -> LATIN SMALL LETTER L WITH CARON |
| 226 | u'\u017c' # 0xBF -> LATIN SMALL LETTER Z WITH DOT ABOVE |
| 227 | u'\u0154' # 0xC0 -> LATIN CAPITAL LETTER R WITH ACUTE |
| 228 | u'\xc1' # 0xC1 -> LATIN CAPITAL LETTER A WITH ACUTE |
| 229 | u'\xc2' # 0xC2 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX |
| 230 | u'\u0102' # 0xC3 -> LATIN CAPITAL LETTER A WITH BREVE |
| 231 | u'\xc4' # 0xC4 -> LATIN CAPITAL LETTER A WITH DIAERESIS |
| 232 | u'\u0139' # 0xC5 -> LATIN CAPITAL LETTER L WITH ACUTE |
| 233 | u'\u0106' # 0xC6 -> LATIN CAPITAL LETTER C WITH ACUTE |
| 234 | u'\xc7' # 0xC7 -> LATIN CAPITAL LETTER C WITH CEDILLA |
| 235 | u'\u010c' # 0xC8 -> LATIN CAPITAL LETTER C WITH CARON |
| 236 | u'\xc9' # 0xC9 -> LATIN CAPITAL LETTER E WITH ACUTE |
| 237 | u'\u0118' # 0xCA -> LATIN CAPITAL LETTER E WITH OGONEK |
| 238 | u'\xcb' # 0xCB -> LATIN CAPITAL LETTER E WITH DIAERESIS |
| 239 | u'\u011a' # 0xCC -> LATIN CAPITAL LETTER E WITH CARON |
| 240 | u'\xcd' # 0xCD -> LATIN CAPITAL LETTER I WITH ACUTE |
| 241 | u'\xce' # 0xCE -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX |
| 242 | u'\u010e' # 0xCF -> LATIN CAPITAL LETTER D WITH CARON |
| 243 | u'\u0110' # 0xD0 -> LATIN CAPITAL LETTER D WITH STROKE |
| 244 | u'\u0143' # 0xD1 -> LATIN CAPITAL LETTER N WITH ACUTE |
| 245 | u'\u0147' # 0xD2 -> LATIN CAPITAL LETTER N WITH CARON |
| 246 | u'\xd3' # 0xD3 -> LATIN CAPITAL LETTER O WITH ACUTE |
| 247 | u'\xd4' # 0xD4 -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX |
| 248 | u'\u0150' # 0xD5 -> LATIN CAPITAL LETTER O WITH DOUBLE ACUTE |
| 249 | u'\xd6' # 0xD6 -> LATIN CAPITAL LETTER O WITH DIAERESIS |
| 250 | u'\xd7' # 0xD7 -> MULTIPLICATION SIGN |
| 251 | u'\u0158' # 0xD8 -> LATIN CAPITAL LETTER R WITH CARON |
| 252 | u'\u016e' # 0xD9 -> LATIN CAPITAL LETTER U WITH RING ABOVE |
| 253 | u'\xda' # 0xDA -> LATIN CAPITAL LETTER U WITH ACUTE |
| 254 | u'\u0170' # 0xDB -> LATIN CAPITAL LETTER U WITH DOUBLE ACUTE |
| 255 | u'\xdc' # 0xDC -> LATIN CAPITAL LETTER U WITH DIAERESIS |
| 256 | u'\xdd' # 0xDD -> LATIN CAPITAL LETTER Y WITH ACUTE |
| 257 | u'\u0162' # 0xDE -> LATIN CAPITAL LETTER T WITH CEDILLA |
| 258 | u'\xdf' # 0xDF -> LATIN SMALL LETTER SHARP S |
| 259 | u'\u0155' # 0xE0 -> LATIN SMALL LETTER R WITH ACUTE |
| 260 | u'\xe1' # 0xE1 -> LATIN SMALL LETTER A WITH ACUTE |
| 261 | u'\xe2' # 0xE2 -> LATIN SMALL LETTER A WITH CIRCUMFLEX |
| 262 | u'\u0103' # 0xE3 -> LATIN SMALL LETTER A WITH BREVE |
| 263 | u'\xe4' # 0xE4 -> LATIN SMALL LETTER A WITH DIAERESIS |
| 264 | u'\u013a' # 0xE5 -> LATIN SMALL LETTER L WITH ACUTE |
| 265 | u'\u0107' # 0xE6 -> LATIN SMALL LETTER C WITH ACUTE |
| 266 | u'\xe7' # 0xE7 -> LATIN SMALL LETTER C WITH CEDILLA |
| 267 | u'\u010d' # 0xE8 -> LATIN SMALL LETTER C WITH CARON |
| 268 | u'\xe9' # 0xE9 -> LATIN SMALL LETTER E WITH ACUTE |
| 269 | u'\u0119' # 0xEA -> LATIN SMALL LETTER E WITH OGONEK |
| 270 | u'\xeb' # 0xEB -> LATIN SMALL LETTER E WITH DIAERESIS |
| 271 | u'\u011b' # 0xEC -> LATIN SMALL LETTER E WITH CARON |
| 272 | u'\xed' # 0xED -> LATIN SMALL LETTER I WITH ACUTE |
| 273 | u'\xee' # 0xEE -> LATIN SMALL LETTER I WITH CIRCUMFLEX |
| 274 | u'\u010f' # 0xEF -> LATIN SMALL LETTER D WITH CARON |
| 275 | u'\u0111' # 0xF0 -> LATIN SMALL LETTER D WITH STROKE |
| 276 | u'\u0144' # 0xF1 -> LATIN SMALL LETTER N WITH ACUTE |
| 277 | u'\u0148' # 0xF2 -> LATIN SMALL LETTER N WITH CARON |
| 278 | u'\xf3' # 0xF3 -> LATIN SMALL LETTER O WITH ACUTE |
| 279 | u'\xf4' # 0xF4 -> LATIN SMALL LETTER O WITH CIRCUMFLEX |
| 280 | u'\u0151' # 0xF5 -> LATIN SMALL LETTER O WITH DOUBLE ACUTE |
| 281 | u'\xf6' # 0xF6 -> LATIN SMALL LETTER O WITH DIAERESIS |
| 282 | u'\xf7' # 0xF7 -> DIVISION SIGN |
| 283 | u'\u0159' # 0xF8 -> LATIN SMALL LETTER R WITH CARON |
| 284 | u'\u016f' # 0xF9 -> LATIN SMALL LETTER U WITH RING ABOVE |
| 285 | u'\xfa' # 0xFA -> LATIN SMALL LETTER U WITH ACUTE |
| 286 | u'\u0171' # 0xFB -> LATIN SMALL LETTER U WITH DOUBLE ACUTE |
| 287 | u'\xfc' # 0xFC -> LATIN SMALL LETTER U WITH DIAERESIS |
| 288 | u'\xfd' # 0xFD -> LATIN SMALL LETTER Y WITH ACUTE |
| 289 | u'\u0163' # 0xFE -> LATIN SMALL LETTER T WITH CEDILLA |
| 290 | u'\u02d9' # 0xFF -> DOT ABOVE |
Marc-André Lemburg | a1129f4 | 2005-10-21 13:49:12 +0000 | [diff] [blame] | 291 | ) |
| 292 | |
Guido van Rossum | 0229bf6 | 2000-03-10 23:17:24 +0000 | [diff] [blame] | 293 | ### Encoding Map |
| 294 | |
Marc-André Lemburg | a1129f4 | 2005-10-21 13:49:12 +0000 | [diff] [blame] | 295 | encoding_map = { |
Tim Peters | 536cf99 | 2005-12-25 23:18:31 +0000 | [diff] [blame] | 296 | 0x0000: 0x00, # NULL |
| 297 | 0x0001: 0x01, # START OF HEADING |
| 298 | 0x0002: 0x02, # START OF TEXT |
| 299 | 0x0003: 0x03, # END OF TEXT |
| 300 | 0x0004: 0x04, # END OF TRANSMISSION |
| 301 | 0x0005: 0x05, # ENQUIRY |
| 302 | 0x0006: 0x06, # ACKNOWLEDGE |
| 303 | 0x0007: 0x07, # BELL |
| 304 | 0x0008: 0x08, # BACKSPACE |
| 305 | 0x0009: 0x09, # HORIZONTAL TABULATION |
| 306 | 0x000A: 0x0A, # LINE FEED |
| 307 | 0x000B: 0x0B, # VERTICAL TABULATION |
| 308 | 0x000C: 0x0C, # FORM FEED |
| 309 | 0x000D: 0x0D, # CARRIAGE RETURN |
| 310 | 0x000E: 0x0E, # SHIFT OUT |
| 311 | 0x000F: 0x0F, # SHIFT IN |
| 312 | 0x0010: 0x10, # DATA LINK ESCAPE |
| 313 | 0x0011: 0x11, # DEVICE CONTROL ONE |
| 314 | 0x0012: 0x12, # DEVICE CONTROL TWO |
| 315 | 0x0013: 0x13, # DEVICE CONTROL THREE |
| 316 | 0x0014: 0x14, # DEVICE CONTROL FOUR |
| 317 | 0x0015: 0x15, # NEGATIVE ACKNOWLEDGE |
| 318 | 0x0016: 0x16, # SYNCHRONOUS IDLE |
| 319 | 0x0017: 0x17, # END OF TRANSMISSION BLOCK |
| 320 | 0x0018: 0x18, # CANCEL |
| 321 | 0x0019: 0x19, # END OF MEDIUM |
| 322 | 0x001A: 0x1A, # SUBSTITUTE |
| 323 | 0x001B: 0x1B, # ESCAPE |
| 324 | 0x001C: 0x1C, # FILE SEPARATOR |
| 325 | 0x001D: 0x1D, # GROUP SEPARATOR |
| 326 | 0x001E: 0x1E, # RECORD SEPARATOR |
| 327 | 0x001F: 0x1F, # UNIT SEPARATOR |
| 328 | 0x0020: 0x20, # SPACE |
| 329 | 0x0021: 0x21, # EXCLAMATION MARK |
| 330 | 0x0022: 0x22, # QUOTATION MARK |
| 331 | 0x0023: 0x23, # NUMBER SIGN |
| 332 | 0x0024: 0x24, # DOLLAR SIGN |
| 333 | 0x0025: 0x25, # PERCENT SIGN |
| 334 | 0x0026: 0x26, # AMPERSAND |
| 335 | 0x0027: 0x27, # APOSTROPHE |
| 336 | 0x0028: 0x28, # LEFT PARENTHESIS |
| 337 | 0x0029: 0x29, # RIGHT PARENTHESIS |
| 338 | 0x002A: 0x2A, # ASTERISK |
| 339 | 0x002B: 0x2B, # PLUS SIGN |
| 340 | 0x002C: 0x2C, # COMMA |
| 341 | 0x002D: 0x2D, # HYPHEN-MINUS |
| 342 | 0x002E: 0x2E, # FULL STOP |
| 343 | 0x002F: 0x2F, # SOLIDUS |
| 344 | 0x0030: 0x30, # DIGIT ZERO |
| 345 | 0x0031: 0x31, # DIGIT ONE |
| 346 | 0x0032: 0x32, # DIGIT TWO |
| 347 | 0x0033: 0x33, # DIGIT THREE |
| 348 | 0x0034: 0x34, # DIGIT FOUR |
| 349 | 0x0035: 0x35, # DIGIT FIVE |
| 350 | 0x0036: 0x36, # DIGIT SIX |
| 351 | 0x0037: 0x37, # DIGIT SEVEN |
| 352 | 0x0038: 0x38, # DIGIT EIGHT |
| 353 | 0x0039: 0x39, # DIGIT NINE |
| 354 | 0x003A: 0x3A, # COLON |
| 355 | 0x003B: 0x3B, # SEMICOLON |
| 356 | 0x003C: 0x3C, # LESS-THAN SIGN |
| 357 | 0x003D: 0x3D, # EQUALS SIGN |
| 358 | 0x003E: 0x3E, # GREATER-THAN SIGN |
| 359 | 0x003F: 0x3F, # QUESTION MARK |
| 360 | 0x0040: 0x40, # COMMERCIAL AT |
| 361 | 0x0041: 0x41, # LATIN CAPITAL LETTER A |
| 362 | 0x0042: 0x42, # LATIN CAPITAL LETTER B |
| 363 | 0x0043: 0x43, # LATIN CAPITAL LETTER C |
| 364 | 0x0044: 0x44, # LATIN CAPITAL LETTER D |
| 365 | 0x0045: 0x45, # LATIN CAPITAL LETTER E |
| 366 | 0x0046: 0x46, # LATIN CAPITAL LETTER F |
| 367 | 0x0047: 0x47, # LATIN CAPITAL LETTER G |
| 368 | 0x0048: 0x48, # LATIN CAPITAL LETTER H |
| 369 | 0x0049: 0x49, # LATIN CAPITAL LETTER I |
| 370 | 0x004A: 0x4A, # LATIN CAPITAL LETTER J |
| 371 | 0x004B: 0x4B, # LATIN CAPITAL LETTER K |
| 372 | 0x004C: 0x4C, # LATIN CAPITAL LETTER L |
| 373 | 0x004D: 0x4D, # LATIN CAPITAL LETTER M |
| 374 | 0x004E: 0x4E, # LATIN CAPITAL LETTER N |
| 375 | 0x004F: 0x4F, # LATIN CAPITAL LETTER O |
| 376 | 0x0050: 0x50, # LATIN CAPITAL LETTER P |
| 377 | 0x0051: 0x51, # LATIN CAPITAL LETTER Q |
| 378 | 0x0052: 0x52, # LATIN CAPITAL LETTER R |
| 379 | 0x0053: 0x53, # LATIN CAPITAL LETTER S |
| 380 | 0x0054: 0x54, # LATIN CAPITAL LETTER T |
| 381 | 0x0055: 0x55, # LATIN CAPITAL LETTER U |
| 382 | 0x0056: 0x56, # LATIN CAPITAL LETTER V |
| 383 | 0x0057: 0x57, # LATIN CAPITAL LETTER W |
| 384 | 0x0058: 0x58, # LATIN CAPITAL LETTER X |
| 385 | 0x0059: 0x59, # LATIN CAPITAL LETTER Y |
| 386 | 0x005A: 0x5A, # LATIN CAPITAL LETTER Z |
| 387 | 0x005B: 0x5B, # LEFT SQUARE BRACKET |
| 388 | 0x005C: 0x5C, # REVERSE SOLIDUS |
| 389 | 0x005D: 0x5D, # RIGHT SQUARE BRACKET |
| 390 | 0x005E: 0x5E, # CIRCUMFLEX ACCENT |
| 391 | 0x005F: 0x5F, # LOW LINE |
| 392 | 0x0060: 0x60, # GRAVE ACCENT |
| 393 | 0x0061: 0x61, # LATIN SMALL LETTER A |
| 394 | 0x0062: 0x62, # LATIN SMALL LETTER B |
| 395 | 0x0063: 0x63, # LATIN SMALL LETTER C |
| 396 | 0x0064: 0x64, # LATIN SMALL LETTER D |
| 397 | 0x0065: 0x65, # LATIN SMALL LETTER E |
| 398 | 0x0066: 0x66, # LATIN SMALL LETTER F |
| 399 | 0x0067: 0x67, # LATIN SMALL LETTER G |
| 400 | 0x0068: 0x68, # LATIN SMALL LETTER H |
| 401 | 0x0069: 0x69, # LATIN SMALL LETTER I |
| 402 | 0x006A: 0x6A, # LATIN SMALL LETTER J |
| 403 | 0x006B: 0x6B, # LATIN SMALL LETTER K |
| 404 | 0x006C: 0x6C, # LATIN SMALL LETTER L |
| 405 | 0x006D: 0x6D, # LATIN SMALL LETTER M |
| 406 | 0x006E: 0x6E, # LATIN SMALL LETTER N |
| 407 | 0x006F: 0x6F, # LATIN SMALL LETTER O |
| 408 | 0x0070: 0x70, # LATIN SMALL LETTER P |
| 409 | 0x0071: 0x71, # LATIN SMALL LETTER Q |
| 410 | 0x0072: 0x72, # LATIN SMALL LETTER R |
| 411 | 0x0073: 0x73, # LATIN SMALL LETTER S |
| 412 | 0x0074: 0x74, # LATIN SMALL LETTER T |
| 413 | 0x0075: 0x75, # LATIN SMALL LETTER U |
| 414 | 0x0076: 0x76, # LATIN SMALL LETTER V |
| 415 | 0x0077: 0x77, # LATIN SMALL LETTER W |
| 416 | 0x0078: 0x78, # LATIN SMALL LETTER X |
| 417 | 0x0079: 0x79, # LATIN SMALL LETTER Y |
| 418 | 0x007A: 0x7A, # LATIN SMALL LETTER Z |
| 419 | 0x007B: 0x7B, # LEFT CURLY BRACKET |
| 420 | 0x007C: 0x7C, # VERTICAL LINE |
| 421 | 0x007D: 0x7D, # RIGHT CURLY BRACKET |
| 422 | 0x007E: 0x7E, # TILDE |
| 423 | 0x007F: 0x7F, # DELETE |
| 424 | 0x00A0: 0xA0, # NO-BREAK SPACE |
| 425 | 0x00A4: 0xA4, # CURRENCY SIGN |
| 426 | 0x00A6: 0xA6, # BROKEN BAR |
| 427 | 0x00A7: 0xA7, # SECTION SIGN |
| 428 | 0x00A8: 0xA8, # DIAERESIS |
| 429 | 0x00A9: 0xA9, # COPYRIGHT SIGN |
| 430 | 0x00AB: 0xAB, # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK |
| 431 | 0x00AC: 0xAC, # NOT SIGN |
| 432 | 0x00AD: 0xAD, # SOFT HYPHEN |
| 433 | 0x00AE: 0xAE, # REGISTERED SIGN |
| 434 | 0x00B0: 0xB0, # DEGREE SIGN |
| 435 | 0x00B1: 0xB1, # PLUS-MINUS SIGN |
| 436 | 0x00B4: 0xB4, # ACUTE ACCENT |
| 437 | 0x00B5: 0xB5, # MICRO SIGN |
| 438 | 0x00B6: 0xB6, # PILCROW SIGN |
| 439 | 0x00B7: 0xB7, # MIDDLE DOT |
| 440 | 0x00B8: 0xB8, # CEDILLA |
| 441 | 0x00BB: 0xBB, # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK |
| 442 | 0x00C1: 0xC1, # LATIN CAPITAL LETTER A WITH ACUTE |
| 443 | 0x00C2: 0xC2, # LATIN CAPITAL LETTER A WITH CIRCUMFLEX |
| 444 | 0x00C4: 0xC4, # LATIN CAPITAL LETTER A WITH DIAERESIS |
| 445 | 0x00C7: 0xC7, # LATIN CAPITAL LETTER C WITH CEDILLA |
| 446 | 0x00C9: 0xC9, # LATIN CAPITAL LETTER E WITH ACUTE |
| 447 | 0x00CB: 0xCB, # LATIN CAPITAL LETTER E WITH DIAERESIS |
| 448 | 0x00CD: 0xCD, # LATIN CAPITAL LETTER I WITH ACUTE |
| 449 | 0x00CE: 0xCE, # LATIN CAPITAL LETTER I WITH CIRCUMFLEX |
| 450 | 0x00D3: 0xD3, # LATIN CAPITAL LETTER O WITH ACUTE |
| 451 | 0x00D4: 0xD4, # LATIN CAPITAL LETTER O WITH CIRCUMFLEX |
| 452 | 0x00D6: 0xD6, # LATIN CAPITAL LETTER O WITH DIAERESIS |
| 453 | 0x00D7: 0xD7, # MULTIPLICATION SIGN |
| 454 | 0x00DA: 0xDA, # LATIN CAPITAL LETTER U WITH ACUTE |
| 455 | 0x00DC: 0xDC, # LATIN CAPITAL LETTER U WITH DIAERESIS |
| 456 | 0x00DD: 0xDD, # LATIN CAPITAL LETTER Y WITH ACUTE |
| 457 | 0x00DF: 0xDF, # LATIN SMALL LETTER SHARP S |
| 458 | 0x00E1: 0xE1, # LATIN SMALL LETTER A WITH ACUTE |
| 459 | 0x00E2: 0xE2, # LATIN SMALL LETTER A WITH CIRCUMFLEX |
| 460 | 0x00E4: 0xE4, # LATIN SMALL LETTER A WITH DIAERESIS |
| 461 | 0x00E7: 0xE7, # LATIN SMALL LETTER C WITH CEDILLA |
| 462 | 0x00E9: 0xE9, # LATIN SMALL LETTER E WITH ACUTE |
| 463 | 0x00EB: 0xEB, # LATIN SMALL LETTER E WITH DIAERESIS |
| 464 | 0x00ED: 0xED, # LATIN SMALL LETTER I WITH ACUTE |
| 465 | 0x00EE: 0xEE, # LATIN SMALL LETTER I WITH CIRCUMFLEX |
| 466 | 0x00F3: 0xF3, # LATIN SMALL LETTER O WITH ACUTE |
| 467 | 0x00F4: 0xF4, # LATIN SMALL LETTER O WITH CIRCUMFLEX |
| 468 | 0x00F6: 0xF6, # LATIN SMALL LETTER O WITH DIAERESIS |
| 469 | 0x00F7: 0xF7, # DIVISION SIGN |
| 470 | 0x00FA: 0xFA, # LATIN SMALL LETTER U WITH ACUTE |
| 471 | 0x00FC: 0xFC, # LATIN SMALL LETTER U WITH DIAERESIS |
| 472 | 0x00FD: 0xFD, # LATIN SMALL LETTER Y WITH ACUTE |
| 473 | 0x0102: 0xC3, # LATIN CAPITAL LETTER A WITH BREVE |
| 474 | 0x0103: 0xE3, # LATIN SMALL LETTER A WITH BREVE |
| 475 | 0x0104: 0xA5, # LATIN CAPITAL LETTER A WITH OGONEK |
| 476 | 0x0105: 0xB9, # LATIN SMALL LETTER A WITH OGONEK |
| 477 | 0x0106: 0xC6, # LATIN CAPITAL LETTER C WITH ACUTE |
| 478 | 0x0107: 0xE6, # LATIN SMALL LETTER C WITH ACUTE |
| 479 | 0x010C: 0xC8, # LATIN CAPITAL LETTER C WITH CARON |
| 480 | 0x010D: 0xE8, # LATIN SMALL LETTER C WITH CARON |
| 481 | 0x010E: 0xCF, # LATIN CAPITAL LETTER D WITH CARON |
| 482 | 0x010F: 0xEF, # LATIN SMALL LETTER D WITH CARON |
| 483 | 0x0110: 0xD0, # LATIN CAPITAL LETTER D WITH STROKE |
| 484 | 0x0111: 0xF0, # LATIN SMALL LETTER D WITH STROKE |
| 485 | 0x0118: 0xCA, # LATIN CAPITAL LETTER E WITH OGONEK |
| 486 | 0x0119: 0xEA, # LATIN SMALL LETTER E WITH OGONEK |
| 487 | 0x011A: 0xCC, # LATIN CAPITAL LETTER E WITH CARON |
| 488 | 0x011B: 0xEC, # LATIN SMALL LETTER E WITH CARON |
| 489 | 0x0139: 0xC5, # LATIN CAPITAL LETTER L WITH ACUTE |
| 490 | 0x013A: 0xE5, # LATIN SMALL LETTER L WITH ACUTE |
| 491 | 0x013D: 0xBC, # LATIN CAPITAL LETTER L WITH CARON |
| 492 | 0x013E: 0xBE, # LATIN SMALL LETTER L WITH CARON |
| 493 | 0x0141: 0xA3, # LATIN CAPITAL LETTER L WITH STROKE |
| 494 | 0x0142: 0xB3, # LATIN SMALL LETTER L WITH STROKE |
| 495 | 0x0143: 0xD1, # LATIN CAPITAL LETTER N WITH ACUTE |
| 496 | 0x0144: 0xF1, # LATIN SMALL LETTER N WITH ACUTE |
| 497 | 0x0147: 0xD2, # LATIN CAPITAL LETTER N WITH CARON |
| 498 | 0x0148: 0xF2, # LATIN SMALL LETTER N WITH CARON |
| 499 | 0x0150: 0xD5, # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE |
| 500 | 0x0151: 0xF5, # LATIN SMALL LETTER O WITH DOUBLE ACUTE |
| 501 | 0x0154: 0xC0, # LATIN CAPITAL LETTER R WITH ACUTE |
| 502 | 0x0155: 0xE0, # LATIN SMALL LETTER R WITH ACUTE |
| 503 | 0x0158: 0xD8, # LATIN CAPITAL LETTER R WITH CARON |
| 504 | 0x0159: 0xF8, # LATIN SMALL LETTER R WITH CARON |
| 505 | 0x015A: 0x8C, # LATIN CAPITAL LETTER S WITH ACUTE |
| 506 | 0x015B: 0x9C, # LATIN SMALL LETTER S WITH ACUTE |
| 507 | 0x015E: 0xAA, # LATIN CAPITAL LETTER S WITH CEDILLA |
| 508 | 0x015F: 0xBA, # LATIN SMALL LETTER S WITH CEDILLA |
| 509 | 0x0160: 0x8A, # LATIN CAPITAL LETTER S WITH CARON |
| 510 | 0x0161: 0x9A, # LATIN SMALL LETTER S WITH CARON |
| 511 | 0x0162: 0xDE, # LATIN CAPITAL LETTER T WITH CEDILLA |
| 512 | 0x0163: 0xFE, # LATIN SMALL LETTER T WITH CEDILLA |
| 513 | 0x0164: 0x8D, # LATIN CAPITAL LETTER T WITH CARON |
| 514 | 0x0165: 0x9D, # LATIN SMALL LETTER T WITH CARON |
| 515 | 0x016E: 0xD9, # LATIN CAPITAL LETTER U WITH RING ABOVE |
| 516 | 0x016F: 0xF9, # LATIN SMALL LETTER U WITH RING ABOVE |
| 517 | 0x0170: 0xDB, # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE |
| 518 | 0x0171: 0xFB, # LATIN SMALL LETTER U WITH DOUBLE ACUTE |
| 519 | 0x0179: 0x8F, # LATIN CAPITAL LETTER Z WITH ACUTE |
| 520 | 0x017A: 0x9F, # LATIN SMALL LETTER Z WITH ACUTE |
| 521 | 0x017B: 0xAF, # LATIN CAPITAL LETTER Z WITH DOT ABOVE |
| 522 | 0x017C: 0xBF, # LATIN SMALL LETTER Z WITH DOT ABOVE |
| 523 | 0x017D: 0x8E, # LATIN CAPITAL LETTER Z WITH CARON |
| 524 | 0x017E: 0x9E, # LATIN SMALL LETTER Z WITH CARON |
| 525 | 0x02C7: 0xA1, # CARON |
| 526 | 0x02D8: 0xA2, # BREVE |
| 527 | 0x02D9: 0xFF, # DOT ABOVE |
| 528 | 0x02DB: 0xB2, # OGONEK |
| 529 | 0x02DD: 0xBD, # DOUBLE ACUTE ACCENT |
| 530 | 0x2013: 0x96, # EN DASH |
| 531 | 0x2014: 0x97, # EM DASH |
| 532 | 0x2018: 0x91, # LEFT SINGLE QUOTATION MARK |
| 533 | 0x2019: 0x92, # RIGHT SINGLE QUOTATION MARK |
| 534 | 0x201A: 0x82, # SINGLE LOW-9 QUOTATION MARK |
| 535 | 0x201C: 0x93, # LEFT DOUBLE QUOTATION MARK |
| 536 | 0x201D: 0x94, # RIGHT DOUBLE QUOTATION MARK |
| 537 | 0x201E: 0x84, # DOUBLE LOW-9 QUOTATION MARK |
| 538 | 0x2020: 0x86, # DAGGER |
| 539 | 0x2021: 0x87, # DOUBLE DAGGER |
| 540 | 0x2022: 0x95, # BULLET |
| 541 | 0x2026: 0x85, # HORIZONTAL ELLIPSIS |
| 542 | 0x2030: 0x89, # PER MILLE SIGN |
| 543 | 0x2039: 0x8B, # SINGLE LEFT-POINTING ANGLE QUOTATION MARK |
| 544 | 0x203A: 0x9B, # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK |
| 545 | 0x20AC: 0x80, # EURO SIGN |
| 546 | 0x2122: 0x99, # TRADE MARK SIGN |
Marc-André Lemburg | d9cf593 | 2005-10-24 12:14:59 +0000 | [diff] [blame] | 547 | } |