NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

cp864.py (6451B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\carbon\common\stdlib\encodings\cp864.py
      2 import codecs
      3 
      4 class Codec(codecs.Codec):
      5 
      6     def encode(self, input, errors = 'strict'):
      7         return codecs.charmap_encode(input, errors, encoding_map)
      8 
      9     def decode(self, input, errors = 'strict'):
     10         return codecs.charmap_decode(input, errors, decoding_table)
     11 
     12 
     13 class IncrementalEncoder(codecs.IncrementalEncoder):
     14 
     15     def encode(self, input, final = False):
     16         return codecs.charmap_encode(input, self.errors, encoding_map)[0]
     17 
     18 
     19 class IncrementalDecoder(codecs.IncrementalDecoder):
     20 
     21     def decode(self, input, final = False):
     22         return codecs.charmap_decode(input, self.errors, decoding_table)[0]
     23 
     24 
     25 class StreamWriter(Codec, codecs.StreamWriter):
     26     pass
     27 
     28 
     29 class StreamReader(Codec, codecs.StreamReader):
     30     pass
     31 
     32 
     33 def getregentry():
     34     return codecs.CodecInfo(name='cp864', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter)
     35 
     36 
     37 decoding_map = codecs.make_identity_dict(range(256))
     38 decoding_map.update({37: 1642,
     39  128: 176,
     40  129: 183,
     41  130: 8729,
     42  131: 8730,
     43  132: 9618,
     44  133: 9472,
     45  134: 9474,
     46  135: 9532,
     47  136: 9508,
     48  137: 9516,
     49  138: 9500,
     50  139: 9524,
     51  140: 9488,
     52  141: 9484,
     53  142: 9492,
     54  143: 9496,
     55  144: 946,
     56  145: 8734,
     57  146: 966,
     58  147: 177,
     59  148: 189,
     60  149: 188,
     61  150: 8776,
     62  151: 171,
     63  152: 187,
     64  153: 65271,
     65  154: 65272,
     66  155: None,
     67  156: None,
     68  157: 65275,
     69  158: 65276,
     70  159: None,
     71  161: 173,
     72  162: 65154,
     73  165: 65156,
     74  166: None,
     75  167: None,
     76  168: 65166,
     77  169: 65167,
     78  170: 65173,
     79  171: 65177,
     80  172: 1548,
     81  173: 65181,
     82  174: 65185,
     83  175: 65189,
     84  176: 1632,
     85  177: 1633,
     86  178: 1634,
     87  179: 1635,
     88  180: 1636,
     89  181: 1637,
     90  182: 1638,
     91  183: 1639,
     92  184: 1640,
     93  185: 1641,
     94  186: 65233,
     95  187: 1563,
     96  188: 65201,
     97  189: 65205,
     98  190: 65209,
     99  191: 1567,
    100  192: 162,
    101  193: 65152,
    102  194: 65153,
    103  195: 65155,
    104  196: 65157,
    105  197: 65226,
    106  198: 65163,
    107  199: 65165,
    108  200: 65169,
    109  201: 65171,
    110  202: 65175,
    111  203: 65179,
    112  204: 65183,
    113  205: 65187,
    114  206: 65191,
    115  207: 65193,
    116  208: 65195,
    117  209: 65197,
    118  210: 65199,
    119  211: 65203,
    120  212: 65207,
    121  213: 65211,
    122  214: 65215,
    123  215: 65217,
    124  216: 65221,
    125  217: 65227,
    126  218: 65231,
    127  219: 166,
    128  220: 172,
    129  221: 247,
    130  222: 215,
    131  223: 65225,
    132  224: 1600,
    133  225: 65235,
    134  226: 65239,
    135  227: 65243,
    136  228: 65247,
    137  229: 65251,
    138  230: 65255,
    139  231: 65259,
    140  232: 65261,
    141  233: 65263,
    142  234: 65267,
    143  235: 65213,
    144  236: 65228,
    145  237: 65230,
    146  238: 65229,
    147  239: 65249,
    148  240: 65149,
    149  241: 1617,
    150  242: 65253,
    151  243: 65257,
    152  244: 65260,
    153  245: 65264,
    154  246: 65266,
    155  247: 65232,
    156  248: 65237,
    157  249: 65269,
    158  250: 65270,
    159  251: 65245,
    160  252: 65241,
    161  253: 65265,
    162  254: 9632,
    163  255: None})
    164 decoding_table = u'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$\u066a&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xb0\xb7\u2219\u221a\u2592\u2500\u2502\u253c\u2524\u252c\u251c\u2534\u2510\u250c\u2514\u2518\u03b2\u221e\u03c6\xb1\xbd\xbc\u2248\xab\xbb\ufef7\ufef8\ufffe\ufffe\ufefb\ufefc\ufffe\xa0\xad\ufe82\xa3\xa4\ufe84\ufffe\ufffe\ufe8e\ufe8f\ufe95\ufe99\u060c\ufe9d\ufea1\ufea5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufed1\u061b\ufeb1\ufeb5\ufeb9\u061f\xa2\ufe80\ufe81\ufe83\ufe85\ufeca\ufe8b\ufe8d\ufe91\ufe93\ufe97\ufe9b\ufe9f\ufea3\ufea7\ufea9\ufeab\ufead\ufeaf\ufeb3\ufeb7\ufebb\ufebf\ufec1\ufec5\ufecb\ufecf\xa6\xac\xf7\xd7\ufec9\u0640\ufed3\ufed7\ufedb\ufedf\ufee3\ufee7\ufeeb\ufeed\ufeef\ufef3\ufebd\ufecc\ufece\ufecd\ufee1\ufe7d\u0651\ufee5\ufee9\ufeec\ufef0\ufef2\ufed0\ufed5\ufef5\ufef6\ufedd\ufed9\ufef1\u25a0\ufffe'
    165 encoding_map = {0: 0,
    166  1: 1,
    167  2: 2,
    168  3: 3,
    169  4: 4,
    170  5: 5,
    171  6: 6,
    172  7: 7,
    173  8: 8,
    174  9: 9,
    175  10: 10,
    176  11: 11,
    177  12: 12,
    178  13: 13,
    179  14: 14,
    180  15: 15,
    181  16: 16,
    182  17: 17,
    183  18: 18,
    184  19: 19,
    185  20: 20,
    186  21: 21,
    187  22: 22,
    188  23: 23,
    189  24: 24,
    190  25: 25,
    191  26: 26,
    192  27: 27,
    193  28: 28,
    194  29: 29,
    195  30: 30,
    196  31: 31,
    197  32: 32,
    198  33: 33,
    199  34: 34,
    200  35: 35,
    201  36: 36,
    202  38: 38,
    203  39: 39,
    204  40: 40,
    205  41: 41,
    206  42: 42,
    207  43: 43,
    208  44: 44,
    209  45: 45,
    210  46: 46,
    211  47: 47,
    212  48: 48,
    213  49: 49,
    214  50: 50,
    215  51: 51,
    216  52: 52,
    217  53: 53,
    218  54: 54,
    219  55: 55,
    220  56: 56,
    221  57: 57,
    222  58: 58,
    223  59: 59,
    224  60: 60,
    225  61: 61,
    226  62: 62,
    227  63: 63,
    228  64: 64,
    229  65: 65,
    230  66: 66,
    231  67: 67,
    232  68: 68,
    233  69: 69,
    234  70: 70,
    235  71: 71,
    236  72: 72,
    237  73: 73,
    238  74: 74,
    239  75: 75,
    240  76: 76,
    241  77: 77,
    242  78: 78,
    243  79: 79,
    244  80: 80,
    245  81: 81,
    246  82: 82,
    247  83: 83,
    248  84: 84,
    249  85: 85,
    250  86: 86,
    251  87: 87,
    252  88: 88,
    253  89: 89,
    254  90: 90,
    255  91: 91,
    256  92: 92,
    257  93: 93,
    258  94: 94,
    259  95: 95,
    260  96: 96,
    261  97: 97,
    262  98: 98,
    263  99: 99,
    264  100: 100,
    265  101: 101,
    266  102: 102,
    267  103: 103,
    268  104: 104,
    269  105: 105,
    270  106: 106,
    271  107: 107,
    272  108: 108,
    273  109: 109,
    274  110: 110,
    275  111: 111,
    276  112: 112,
    277  113: 113,
    278  114: 114,
    279  115: 115,
    280  116: 116,
    281  117: 117,
    282  118: 118,
    283  119: 119,
    284  120: 120,
    285  121: 121,
    286  122: 122,
    287  123: 123,
    288  124: 124,
    289  125: 125,
    290  126: 126,
    291  127: 127,
    292  160: 160,
    293  162: 192,
    294  163: 163,
    295  164: 164,
    296  166: 219,
    297  171: 151,
    298  172: 220,
    299  173: 161,
    300  176: 128,
    301  177: 147,
    302  183: 129,
    303  187: 152,
    304  188: 149,
    305  189: 148,
    306  215: 222,
    307  247: 221,
    308  946: 144,
    309  966: 146,
    310  1548: 172,
    311  1563: 187,
    312  1567: 191,
    313  1600: 224,
    314  1617: 241,
    315  1632: 176,
    316  1633: 177,
    317  1634: 178,
    318  1635: 179,
    319  1636: 180,
    320  1637: 181,
    321  1638: 182,
    322  1639: 183,
    323  1640: 184,
    324  1641: 185,
    325  1642: 37,
    326  8729: 130,
    327  8730: 131,
    328  8734: 145,
    329  8776: 150,
    330  9472: 133,
    331  9474: 134,
    332  9484: 141,
    333  9488: 140,
    334  9492: 142,
    335  9496: 143,
    336  9500: 138,
    337  9508: 136,
    338  9516: 137,
    339  9524: 139,
    340  9532: 135,
    341  9618: 132,
    342  9632: 254,
    343  65149: 240,
    344  65152: 193,
    345  65153: 194,
    346  65154: 162,
    347  65155: 195,
    348  65156: 165,
    349  65157: 196,
    350  65163: 198,
    351  65165: 199,
    352  65166: 168,
    353  65167: 169,
    354  65169: 200,
    355  65171: 201,
    356  65173: 170,
    357  65175: 202,
    358  65177: 171,
    359  65179: 203,
    360  65181: 173,
    361  65183: 204,
    362  65185: 174,
    363  65187: 205,
    364  65189: 175,
    365  65191: 206,
    366  65193: 207,
    367  65195: 208,
    368  65197: 209,
    369  65199: 210,
    370  65201: 188,
    371  65203: 211,
    372  65205: 189,
    373  65207: 212,
    374  65209: 190,
    375  65211: 213,
    376  65213: 235,
    377  65215: 214,
    378  65217: 215,
    379  65221: 216,
    380  65225: 223,
    381  65226: 197,
    382  65227: 217,
    383  65228: 236,
    384  65229: 238,
    385  65230: 237,
    386  65231: 218,
    387  65232: 247,
    388  65233: 186,
    389  65235: 225,
    390  65237: 248,
    391  65239: 226,
    392  65241: 252,
    393  65243: 227,
    394  65245: 251,
    395  65247: 228,
    396  65249: 239,
    397  65251: 229,
    398  65253: 242,
    399  65255: 230,
    400  65257: 243,
    401  65259: 231,
    402  65260: 244,
    403  65261: 232,
    404  65263: 233,
    405  65264: 245,
    406  65265: 253,
    407  65266: 246,
    408  65267: 234,
    409  65269: 249,
    410  65270: 250,
    411  65271: 153,
    412  65272: 154,
    413  65275: 157,
    414  65276: 158}