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

iso8859_5.py (2109B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\carbon\common\stdlib\encodings\iso8859_5.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_table)
      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_table)[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='iso8859-5', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter)
     35 
     36 
     37 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 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040a\u040b\u040c\xad\u040e\u040f\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\xa7\u045e\u045f'
     38 encoding_table = codecs.charmap_build(decoding_table)