1""" Python Character Mapping Codec cp424 generated from 'MAPPINGS/VENDORS/MISC/CP424.TXT' with gencodec.py. 2 3"""#" 4 5import codecs 6 7### Codec APIs 8 9class Codec(codecs.Codec): 10 11 def encode(self,input,errors='strict'): 12 return codecs.charmap_encode(input,errors,encoding_table) 13 14 def decode(self,input,errors='strict'): 15 return codecs.charmap_decode(input,errors,decoding_table) 16 17class IncrementalEncoder(codecs.IncrementalEncoder): 18 def encode(self, input, final=False): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 20 21class IncrementalDecoder(codecs.IncrementalDecoder): 22 def decode(self, input, final=False): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 24 25class StreamWriter(Codec,codecs.StreamWriter): 26 pass 27 28class StreamReader(Codec,codecs.StreamReader): 29 pass 30 31### encodings module API 32 33def getregentry(): 34 return codecs.CodecInfo( 35 name='cp424', 36 encode=Codec().encode, 37 decode=Codec().decode, 38 incrementalencoder=IncrementalEncoder, 39 incrementaldecoder=IncrementalDecoder, 40 streamreader=StreamReader, 41 streamwriter=StreamWriter, 42 ) 43 44 45### Decoding Table 46 47decoding_table = ( 48 '\x00' # 0x00 -> NULL 49 '\x01' # 0x01 -> START OF HEADING 50 '\x02' # 0x02 -> START OF TEXT 51 '\x03' # 0x03 -> END OF TEXT 52 '\x9c' # 0x04 -> SELECT 53 '\t' # 0x05 -> HORIZONTAL TABULATION 54 '\x86' # 0x06 -> REQUIRED NEW LINE 55 '\x7f' # 0x07 -> DELETE 56 '\x97' # 0x08 -> GRAPHIC ESCAPE 57 '\x8d' # 0x09 -> SUPERSCRIPT 58 '\x8e' # 0x0A -> REPEAT 59 '\x0b' # 0x0B -> VERTICAL TABULATION 60 '\x0c' # 0x0C -> FORM FEED 61 '\r' # 0x0D -> CARRIAGE RETURN 62 '\x0e' # 0x0E -> SHIFT OUT 63 '\x0f' # 0x0F -> SHIFT IN 64 '\x10' # 0x10 -> DATA LINK ESCAPE 65 '\x11' # 0x11 -> DEVICE CONTROL ONE 66 '\x12' # 0x12 -> DEVICE CONTROL TWO 67 '\x13' # 0x13 -> DEVICE CONTROL THREE 68 '\x9d' # 0x14 -> RESTORE/ENABLE PRESENTATION 69 '\x85' # 0x15 -> NEW LINE 70 '\x08' # 0x16 -> BACKSPACE 71 '\x87' # 0x17 -> PROGRAM OPERATOR COMMUNICATION 72 '\x18' # 0x18 -> CANCEL 73 '\x19' # 0x19 -> END OF MEDIUM 74 '\x92' # 0x1A -> UNIT BACK SPACE 75 '\x8f' # 0x1B -> CUSTOMER USE ONE 76 '\x1c' # 0x1C -> FILE SEPARATOR 77 '\x1d' # 0x1D -> GROUP SEPARATOR 78 '\x1e' # 0x1E -> RECORD SEPARATOR 79 '\x1f' # 0x1F -> UNIT SEPARATOR 80 '\x80' # 0x20 -> DIGIT SELECT 81 '\x81' # 0x21 -> START OF SIGNIFICANCE 82 '\x82' # 0x22 -> FIELD SEPARATOR 83 '\x83' # 0x23 -> WORD UNDERSCORE 84 '\x84' # 0x24 -> BYPASS OR INHIBIT PRESENTATION 85 '\n' # 0x25 -> LINE FEED 86 '\x17' # 0x26 -> END OF TRANSMISSION BLOCK 87 '\x1b' # 0x27 -> ESCAPE 88 '\x88' # 0x28 -> SET ATTRIBUTE 89 '\x89' # 0x29 -> START FIELD EXTENDED 90 '\x8a' # 0x2A -> SET MODE OR SWITCH 91 '\x8b' # 0x2B -> CONTROL SEQUENCE PREFIX 92 '\x8c' # 0x2C -> MODIFY FIELD ATTRIBUTE 93 '\x05' # 0x2D -> ENQUIRY 94 '\x06' # 0x2E -> ACKNOWLEDGE 95 '\x07' # 0x2F -> BELL 96 '\x90' # 0x30 -> <reserved> 97 '\x91' # 0x31 -> <reserved> 98 '\x16' # 0x32 -> SYNCHRONOUS IDLE 99 '\x93' # 0x33 -> INDEX RETURN 100 '\x94' # 0x34 -> PRESENTATION POSITION 101 '\x95' # 0x35 -> TRANSPARENT 102 '\x96' # 0x36 -> NUMERIC BACKSPACE 103 '\x04' # 0x37 -> END OF TRANSMISSION 104 '\x98' # 0x38 -> SUBSCRIPT 105 '\x99' # 0x39 -> INDENT TABULATION 106 '\x9a' # 0x3A -> REVERSE FORM FEED 107 '\x9b' # 0x3B -> CUSTOMER USE THREE 108 '\x14' # 0x3C -> DEVICE CONTROL FOUR 109 '\x15' # 0x3D -> NEGATIVE ACKNOWLEDGE 110 '\x9e' # 0x3E -> <reserved> 111 '\x1a' # 0x3F -> SUBSTITUTE 112 ' ' # 0x40 -> SPACE 113 '\u05d0' # 0x41 -> HEBREW LETTER ALEF 114 '\u05d1' # 0x42 -> HEBREW LETTER BET 115 '\u05d2' # 0x43 -> HEBREW LETTER GIMEL 116 '\u05d3' # 0x44 -> HEBREW LETTER DALET 117 '\u05d4' # 0x45 -> HEBREW LETTER HE 118 '\u05d5' # 0x46 -> HEBREW LETTER VAV 119 '\u05d6' # 0x47 -> HEBREW LETTER ZAYIN 120 '\u05d7' # 0x48 -> HEBREW LETTER HET 121 '\u05d8' # 0x49 -> HEBREW LETTER TET 122 '\xa2' # 0x4A -> CENT SIGN 123 '.' # 0x4B -> FULL STOP 124 '<' # 0x4C -> LESS-THAN SIGN 125 '(' # 0x4D -> LEFT PARENTHESIS 126 '+' # 0x4E -> PLUS SIGN 127 '|' # 0x4F -> VERTICAL LINE 128 '&' # 0x50 -> AMPERSAND 129 '\u05d9' # 0x51 -> HEBREW LETTER YOD 130 '\u05da' # 0x52 -> HEBREW LETTER FINAL KAF 131 '\u05db' # 0x53 -> HEBREW LETTER KAF 132 '\u05dc' # 0x54 -> HEBREW LETTER LAMED 133 '\u05dd' # 0x55 -> HEBREW LETTER FINAL MEM 134 '\u05de' # 0x56 -> HEBREW LETTER MEM 135 '\u05df' # 0x57 -> HEBREW LETTER FINAL NUN 136 '\u05e0' # 0x58 -> HEBREW LETTER NUN 137 '\u05e1' # 0x59 -> HEBREW LETTER SAMEKH 138 '!' # 0x5A -> EXCLAMATION MARK 139 '$' # 0x5B -> DOLLAR SIGN 140 '*' # 0x5C -> ASTERISK 141 ')' # 0x5D -> RIGHT PARENTHESIS 142 ';' # 0x5E -> SEMICOLON 143 '\xac' # 0x5F -> NOT SIGN 144 '-' # 0x60 -> HYPHEN-MINUS 145 '/' # 0x61 -> SOLIDUS 146 '\u05e2' # 0x62 -> HEBREW LETTER AYIN 147 '\u05e3' # 0x63 -> HEBREW LETTER FINAL PE 148 '\u05e4' # 0x64 -> HEBREW LETTER PE 149 '\u05e5' # 0x65 -> HEBREW LETTER FINAL TSADI 150 '\u05e6' # 0x66 -> HEBREW LETTER TSADI 151 '\u05e7' # 0x67 -> HEBREW LETTER QOF 152 '\u05e8' # 0x68 -> HEBREW LETTER RESH 153 '\u05e9' # 0x69 -> HEBREW LETTER SHIN 154 '\xa6' # 0x6A -> BROKEN BAR 155 ',' # 0x6B -> COMMA 156 '%' # 0x6C -> PERCENT SIGN 157 '_' # 0x6D -> LOW LINE 158 '>' # 0x6E -> GREATER-THAN SIGN 159 '?' # 0x6F -> QUESTION MARK 160 '\ufffe' # 0x70 -> UNDEFINED 161 '\u05ea' # 0x71 -> HEBREW LETTER TAV 162 '\ufffe' # 0x72 -> UNDEFINED 163 '\ufffe' # 0x73 -> UNDEFINED 164 '\xa0' # 0x74 -> NO-BREAK SPACE 165 '\ufffe' # 0x75 -> UNDEFINED 166 '\ufffe' # 0x76 -> UNDEFINED 167 '\ufffe' # 0x77 -> UNDEFINED 168 '\u2017' # 0x78 -> DOUBLE LOW LINE 169 '`' # 0x79 -> GRAVE ACCENT 170 ':' # 0x7A -> COLON 171 '#' # 0x7B -> NUMBER SIGN 172 '@' # 0x7C -> COMMERCIAL AT 173 "'" # 0x7D -> APOSTROPHE 174 '=' # 0x7E -> EQUALS SIGN 175 '"' # 0x7F -> QUOTATION MARK 176 '\ufffe' # 0x80 -> UNDEFINED 177 'a' # 0x81 -> LATIN SMALL LETTER A 178 'b' # 0x82 -> LATIN SMALL LETTER B 179 'c' # 0x83 -> LATIN SMALL LETTER C 180 'd' # 0x84 -> LATIN SMALL LETTER D 181 'e' # 0x85 -> LATIN SMALL LETTER E 182 'f' # 0x86 -> LATIN SMALL LETTER F 183 'g' # 0x87 -> LATIN SMALL LETTER G 184 'h' # 0x88 -> LATIN SMALL LETTER H 185 'i' # 0x89 -> LATIN SMALL LETTER I 186 '\xab' # 0x8A -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 187 '\xbb' # 0x8B -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 188 '\ufffe' # 0x8C -> UNDEFINED 189 '\ufffe' # 0x8D -> UNDEFINED 190 '\ufffe' # 0x8E -> UNDEFINED 191 '\xb1' # 0x8F -> PLUS-MINUS SIGN 192 '\xb0' # 0x90 -> DEGREE SIGN 193 'j' # 0x91 -> LATIN SMALL LETTER J 194 'k' # 0x92 -> LATIN SMALL LETTER K 195 'l' # 0x93 -> LATIN SMALL LETTER L 196 'm' # 0x94 -> LATIN SMALL LETTER M 197 'n' # 0x95 -> LATIN SMALL LETTER N 198 'o' # 0x96 -> LATIN SMALL LETTER O 199 'p' # 0x97 -> LATIN SMALL LETTER P 200 'q' # 0x98 -> LATIN SMALL LETTER Q 201 'r' # 0x99 -> LATIN SMALL LETTER R 202 '\ufffe' # 0x9A -> UNDEFINED 203 '\ufffe' # 0x9B -> UNDEFINED 204 '\ufffe' # 0x9C -> UNDEFINED 205 '\xb8' # 0x9D -> CEDILLA 206 '\ufffe' # 0x9E -> UNDEFINED 207 '\xa4' # 0x9F -> CURRENCY SIGN 208 '\xb5' # 0xA0 -> MICRO SIGN 209 '~' # 0xA1 -> TILDE 210 's' # 0xA2 -> LATIN SMALL LETTER S 211 't' # 0xA3 -> LATIN SMALL LETTER T 212 'u' # 0xA4 -> LATIN SMALL LETTER U 213 'v' # 0xA5 -> LATIN SMALL LETTER V 214 'w' # 0xA6 -> LATIN SMALL LETTER W 215 'x' # 0xA7 -> LATIN SMALL LETTER X 216 'y' # 0xA8 -> LATIN SMALL LETTER Y 217 'z' # 0xA9 -> LATIN SMALL LETTER Z 218 '\ufffe' # 0xAA -> UNDEFINED 219 '\ufffe' # 0xAB -> UNDEFINED 220 '\ufffe' # 0xAC -> UNDEFINED 221 '\ufffe' # 0xAD -> UNDEFINED 222 '\ufffe' # 0xAE -> UNDEFINED 223 '\xae' # 0xAF -> REGISTERED SIGN 224 '^' # 0xB0 -> CIRCUMFLEX ACCENT 225 '\xa3' # 0xB1 -> POUND SIGN 226 '\xa5' # 0xB2 -> YEN SIGN 227 '\xb7' # 0xB3 -> MIDDLE DOT 228 '\xa9' # 0xB4 -> COPYRIGHT SIGN 229 '\xa7' # 0xB5 -> SECTION SIGN 230 '\xb6' # 0xB6 -> PILCROW SIGN 231 '\xbc' # 0xB7 -> VULGAR FRACTION ONE QUARTER 232 '\xbd' # 0xB8 -> VULGAR FRACTION ONE HALF 233 '\xbe' # 0xB9 -> VULGAR FRACTION THREE QUARTERS 234 '[' # 0xBA -> LEFT SQUARE BRACKET 235 ']' # 0xBB -> RIGHT SQUARE BRACKET 236 '\xaf' # 0xBC -> MACRON 237 '\xa8' # 0xBD -> DIAERESIS 238 '\xb4' # 0xBE -> ACUTE ACCENT 239 '\xd7' # 0xBF -> MULTIPLICATION SIGN 240 '{' # 0xC0 -> LEFT CURLY BRACKET 241 'A' # 0xC1 -> LATIN CAPITAL LETTER A 242 'B' # 0xC2 -> LATIN CAPITAL LETTER B 243 'C' # 0xC3 -> LATIN CAPITAL LETTER C 244 'D' # 0xC4 -> LATIN CAPITAL LETTER D 245 'E' # 0xC5 -> LATIN CAPITAL LETTER E 246 'F' # 0xC6 -> LATIN CAPITAL LETTER F 247 'G' # 0xC7 -> LATIN CAPITAL LETTER G 248 'H' # 0xC8 -> LATIN CAPITAL LETTER H 249 'I' # 0xC9 -> LATIN CAPITAL LETTER I 250 '\xad' # 0xCA -> SOFT HYPHEN 251 '\ufffe' # 0xCB -> UNDEFINED 252 '\ufffe' # 0xCC -> UNDEFINED 253 '\ufffe' # 0xCD -> UNDEFINED 254 '\ufffe' # 0xCE -> UNDEFINED 255 '\ufffe' # 0xCF -> UNDEFINED 256 '}' # 0xD0 -> RIGHT CURLY BRACKET 257 'J' # 0xD1 -> LATIN CAPITAL LETTER J 258 'K' # 0xD2 -> LATIN CAPITAL LETTER K 259 'L' # 0xD3 -> LATIN CAPITAL LETTER L 260 'M' # 0xD4 -> LATIN CAPITAL LETTER M 261 'N' # 0xD5 -> LATIN CAPITAL LETTER N 262 'O' # 0xD6 -> LATIN CAPITAL LETTER O 263 'P' # 0xD7 -> LATIN CAPITAL LETTER P 264 'Q' # 0xD8 -> LATIN CAPITAL LETTER Q 265 'R' # 0xD9 -> LATIN CAPITAL LETTER R 266 '\xb9' # 0xDA -> SUPERSCRIPT ONE 267 '\ufffe' # 0xDB -> UNDEFINED 268 '\ufffe' # 0xDC -> UNDEFINED 269 '\ufffe' # 0xDD -> UNDEFINED 270 '\ufffe' # 0xDE -> UNDEFINED 271 '\ufffe' # 0xDF -> UNDEFINED 272 '\\' # 0xE0 -> REVERSE SOLIDUS 273 '\xf7' # 0xE1 -> DIVISION SIGN 274 'S' # 0xE2 -> LATIN CAPITAL LETTER S 275 'T' # 0xE3 -> LATIN CAPITAL LETTER T 276 'U' # 0xE4 -> LATIN CAPITAL LETTER U 277 'V' # 0xE5 -> LATIN CAPITAL LETTER V 278 'W' # 0xE6 -> LATIN CAPITAL LETTER W 279 'X' # 0xE7 -> LATIN CAPITAL LETTER X 280 'Y' # 0xE8 -> LATIN CAPITAL LETTER Y 281 'Z' # 0xE9 -> LATIN CAPITAL LETTER Z 282 '\xb2' # 0xEA -> SUPERSCRIPT TWO 283 '\ufffe' # 0xEB -> UNDEFINED 284 '\ufffe' # 0xEC -> UNDEFINED 285 '\ufffe' # 0xED -> UNDEFINED 286 '\ufffe' # 0xEE -> UNDEFINED 287 '\ufffe' # 0xEF -> UNDEFINED 288 '0' # 0xF0 -> DIGIT ZERO 289 '1' # 0xF1 -> DIGIT ONE 290 '2' # 0xF2 -> DIGIT TWO 291 '3' # 0xF3 -> DIGIT THREE 292 '4' # 0xF4 -> DIGIT FOUR 293 '5' # 0xF5 -> DIGIT FIVE 294 '6' # 0xF6 -> DIGIT SIX 295 '7' # 0xF7 -> DIGIT SEVEN 296 '8' # 0xF8 -> DIGIT EIGHT 297 '9' # 0xF9 -> DIGIT NINE 298 '\xb3' # 0xFA -> SUPERSCRIPT THREE 299 '\ufffe' # 0xFB -> UNDEFINED 300 '\ufffe' # 0xFC -> UNDEFINED 301 '\ufffe' # 0xFD -> UNDEFINED 302 '\ufffe' # 0xFE -> UNDEFINED 303 '\x9f' # 0xFF -> EIGHT ONES 304) 305 306### Encoding table 307encoding_table=codecs.charmap_build(decoding_table) 308