Back to index

python3.2  3.2.2
cp857.py
Go to the documentation of this file.
00001 """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.TXT' with gencodec.py.
00002 
00003 """#"
00004 
00005 import codecs
00006 
00007 ### Codec APIs
00008 
00009 class Codec(codecs.Codec):
00010 
00011     def encode(self,input,errors='strict'):
00012         return codecs.charmap_encode(input,errors,encoding_map)
00013 
00014     def decode(self,input,errors='strict'):
00015         return codecs.charmap_decode(input,errors,decoding_table)
00016 
00017 class IncrementalEncoder(codecs.IncrementalEncoder):
00018     def encode(self, input, final=False):
00019         return codecs.charmap_encode(input,self.errors,encoding_map)[0]
00020 
00021 class IncrementalDecoder(codecs.IncrementalDecoder):
00022     def decode(self, input, final=False):
00023         return codecs.charmap_decode(input,self.errors,decoding_table)[0]
00024 
00025 class StreamWriter(Codec,codecs.StreamWriter):
00026     pass
00027 
00028 class StreamReader(Codec,codecs.StreamReader):
00029     pass
00030 
00031 ### encodings module API
00032 
00033 def getregentry():
00034     return codecs.CodecInfo(
00035         name='cp857',
00036         encode=Codec().encode,
00037         decode=Codec().decode,
00038         incrementalencoder=IncrementalEncoder,
00039         incrementaldecoder=IncrementalDecoder,
00040         streamreader=StreamReader,
00041         streamwriter=StreamWriter,
00042     )
00043 
00044 ### Decoding Map
00045 
00046 decoding_map = codecs.make_identity_dict(range(256))
00047 decoding_map.update({
00048     0x0080: 0x00c7,     #  LATIN CAPITAL LETTER C WITH CEDILLA
00049     0x0081: 0x00fc,     #  LATIN SMALL LETTER U WITH DIAERESIS
00050     0x0082: 0x00e9,     #  LATIN SMALL LETTER E WITH ACUTE
00051     0x0083: 0x00e2,     #  LATIN SMALL LETTER A WITH CIRCUMFLEX
00052     0x0084: 0x00e4,     #  LATIN SMALL LETTER A WITH DIAERESIS
00053     0x0085: 0x00e0,     #  LATIN SMALL LETTER A WITH GRAVE
00054     0x0086: 0x00e5,     #  LATIN SMALL LETTER A WITH RING ABOVE
00055     0x0087: 0x00e7,     #  LATIN SMALL LETTER C WITH CEDILLA
00056     0x0088: 0x00ea,     #  LATIN SMALL LETTER E WITH CIRCUMFLEX
00057     0x0089: 0x00eb,     #  LATIN SMALL LETTER E WITH DIAERESIS
00058     0x008a: 0x00e8,     #  LATIN SMALL LETTER E WITH GRAVE
00059     0x008b: 0x00ef,     #  LATIN SMALL LETTER I WITH DIAERESIS
00060     0x008c: 0x00ee,     #  LATIN SMALL LETTER I WITH CIRCUMFLEX
00061     0x008d: 0x0131,     #  LATIN SMALL LETTER DOTLESS I
00062     0x008e: 0x00c4,     #  LATIN CAPITAL LETTER A WITH DIAERESIS
00063     0x008f: 0x00c5,     #  LATIN CAPITAL LETTER A WITH RING ABOVE
00064     0x0090: 0x00c9,     #  LATIN CAPITAL LETTER E WITH ACUTE
00065     0x0091: 0x00e6,     #  LATIN SMALL LIGATURE AE
00066     0x0092: 0x00c6,     #  LATIN CAPITAL LIGATURE AE
00067     0x0093: 0x00f4,     #  LATIN SMALL LETTER O WITH CIRCUMFLEX
00068     0x0094: 0x00f6,     #  LATIN SMALL LETTER O WITH DIAERESIS
00069     0x0095: 0x00f2,     #  LATIN SMALL LETTER O WITH GRAVE
00070     0x0096: 0x00fb,     #  LATIN SMALL LETTER U WITH CIRCUMFLEX
00071     0x0097: 0x00f9,     #  LATIN SMALL LETTER U WITH GRAVE
00072     0x0098: 0x0130,     #  LATIN CAPITAL LETTER I WITH DOT ABOVE
00073     0x0099: 0x00d6,     #  LATIN CAPITAL LETTER O WITH DIAERESIS
00074     0x009a: 0x00dc,     #  LATIN CAPITAL LETTER U WITH DIAERESIS
00075     0x009b: 0x00f8,     #  LATIN SMALL LETTER O WITH STROKE
00076     0x009c: 0x00a3,     #  POUND SIGN
00077     0x009d: 0x00d8,     #  LATIN CAPITAL LETTER O WITH STROKE
00078     0x009e: 0x015e,     #  LATIN CAPITAL LETTER S WITH CEDILLA
00079     0x009f: 0x015f,     #  LATIN SMALL LETTER S WITH CEDILLA
00080     0x00a0: 0x00e1,     #  LATIN SMALL LETTER A WITH ACUTE
00081     0x00a1: 0x00ed,     #  LATIN SMALL LETTER I WITH ACUTE
00082     0x00a2: 0x00f3,     #  LATIN SMALL LETTER O WITH ACUTE
00083     0x00a3: 0x00fa,     #  LATIN SMALL LETTER U WITH ACUTE
00084     0x00a4: 0x00f1,     #  LATIN SMALL LETTER N WITH TILDE
00085     0x00a5: 0x00d1,     #  LATIN CAPITAL LETTER N WITH TILDE
00086     0x00a6: 0x011e,     #  LATIN CAPITAL LETTER G WITH BREVE
00087     0x00a7: 0x011f,     #  LATIN SMALL LETTER G WITH BREVE
00088     0x00a8: 0x00bf,     #  INVERTED QUESTION MARK
00089     0x00a9: 0x00ae,     #  REGISTERED SIGN
00090     0x00aa: 0x00ac,     #  NOT SIGN
00091     0x00ab: 0x00bd,     #  VULGAR FRACTION ONE HALF
00092     0x00ac: 0x00bc,     #  VULGAR FRACTION ONE QUARTER
00093     0x00ad: 0x00a1,     #  INVERTED EXCLAMATION MARK
00094     0x00ae: 0x00ab,     #  LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
00095     0x00af: 0x00bb,     #  RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
00096     0x00b0: 0x2591,     #  LIGHT SHADE
00097     0x00b1: 0x2592,     #  MEDIUM SHADE
00098     0x00b2: 0x2593,     #  DARK SHADE
00099     0x00b3: 0x2502,     #  BOX DRAWINGS LIGHT VERTICAL
00100     0x00b4: 0x2524,     #  BOX DRAWINGS LIGHT VERTICAL AND LEFT
00101     0x00b5: 0x00c1,     #  LATIN CAPITAL LETTER A WITH ACUTE
00102     0x00b6: 0x00c2,     #  LATIN CAPITAL LETTER A WITH CIRCUMFLEX
00103     0x00b7: 0x00c0,     #  LATIN CAPITAL LETTER A WITH GRAVE
00104     0x00b8: 0x00a9,     #  COPYRIGHT SIGN
00105     0x00b9: 0x2563,     #  BOX DRAWINGS DOUBLE VERTICAL AND LEFT
00106     0x00ba: 0x2551,     #  BOX DRAWINGS DOUBLE VERTICAL
00107     0x00bb: 0x2557,     #  BOX DRAWINGS DOUBLE DOWN AND LEFT
00108     0x00bc: 0x255d,     #  BOX DRAWINGS DOUBLE UP AND LEFT
00109     0x00bd: 0x00a2,     #  CENT SIGN
00110     0x00be: 0x00a5,     #  YEN SIGN
00111     0x00bf: 0x2510,     #  BOX DRAWINGS LIGHT DOWN AND LEFT
00112     0x00c0: 0x2514,     #  BOX DRAWINGS LIGHT UP AND RIGHT
00113     0x00c1: 0x2534,     #  BOX DRAWINGS LIGHT UP AND HORIZONTAL
00114     0x00c2: 0x252c,     #  BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
00115     0x00c3: 0x251c,     #  BOX DRAWINGS LIGHT VERTICAL AND RIGHT
00116     0x00c4: 0x2500,     #  BOX DRAWINGS LIGHT HORIZONTAL
00117     0x00c5: 0x253c,     #  BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
00118     0x00c6: 0x00e3,     #  LATIN SMALL LETTER A WITH TILDE
00119     0x00c7: 0x00c3,     #  LATIN CAPITAL LETTER A WITH TILDE
00120     0x00c8: 0x255a,     #  BOX DRAWINGS DOUBLE UP AND RIGHT
00121     0x00c9: 0x2554,     #  BOX DRAWINGS DOUBLE DOWN AND RIGHT
00122     0x00ca: 0x2569,     #  BOX DRAWINGS DOUBLE UP AND HORIZONTAL
00123     0x00cb: 0x2566,     #  BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
00124     0x00cc: 0x2560,     #  BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
00125     0x00cd: 0x2550,     #  BOX DRAWINGS DOUBLE HORIZONTAL
00126     0x00ce: 0x256c,     #  BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
00127     0x00cf: 0x00a4,     #  CURRENCY SIGN
00128     0x00d0: 0x00ba,     #  MASCULINE ORDINAL INDICATOR
00129     0x00d1: 0x00aa,     #  FEMININE ORDINAL INDICATOR
00130     0x00d2: 0x00ca,     #  LATIN CAPITAL LETTER E WITH CIRCUMFLEX
00131     0x00d3: 0x00cb,     #  LATIN CAPITAL LETTER E WITH DIAERESIS
00132     0x00d4: 0x00c8,     #  LATIN CAPITAL LETTER E WITH GRAVE
00133     0x00d5: None,       #  UNDEFINED
00134     0x00d6: 0x00cd,     #  LATIN CAPITAL LETTER I WITH ACUTE
00135     0x00d7: 0x00ce,     #  LATIN CAPITAL LETTER I WITH CIRCUMFLEX
00136     0x00d8: 0x00cf,     #  LATIN CAPITAL LETTER I WITH DIAERESIS
00137     0x00d9: 0x2518,     #  BOX DRAWINGS LIGHT UP AND LEFT
00138     0x00da: 0x250c,     #  BOX DRAWINGS LIGHT DOWN AND RIGHT
00139     0x00db: 0x2588,     #  FULL BLOCK
00140     0x00dc: 0x2584,     #  LOWER HALF BLOCK
00141     0x00dd: 0x00a6,     #  BROKEN BAR
00142     0x00de: 0x00cc,     #  LATIN CAPITAL LETTER I WITH GRAVE
00143     0x00df: 0x2580,     #  UPPER HALF BLOCK
00144     0x00e0: 0x00d3,     #  LATIN CAPITAL LETTER O WITH ACUTE
00145     0x00e1: 0x00df,     #  LATIN SMALL LETTER SHARP S
00146     0x00e2: 0x00d4,     #  LATIN CAPITAL LETTER O WITH CIRCUMFLEX
00147     0x00e3: 0x00d2,     #  LATIN CAPITAL LETTER O WITH GRAVE
00148     0x00e4: 0x00f5,     #  LATIN SMALL LETTER O WITH TILDE
00149     0x00e5: 0x00d5,     #  LATIN CAPITAL LETTER O WITH TILDE
00150     0x00e6: 0x00b5,     #  MICRO SIGN
00151     0x00e7: None,       #  UNDEFINED
00152     0x00e8: 0x00d7,     #  MULTIPLICATION SIGN
00153     0x00e9: 0x00da,     #  LATIN CAPITAL LETTER U WITH ACUTE
00154     0x00ea: 0x00db,     #  LATIN CAPITAL LETTER U WITH CIRCUMFLEX
00155     0x00eb: 0x00d9,     #  LATIN CAPITAL LETTER U WITH GRAVE
00156     0x00ed: 0x00ff,     #  LATIN SMALL LETTER Y WITH DIAERESIS
00157     0x00ee: 0x00af,     #  MACRON
00158     0x00ef: 0x00b4,     #  ACUTE ACCENT
00159     0x00f0: 0x00ad,     #  SOFT HYPHEN
00160     0x00f1: 0x00b1,     #  PLUS-MINUS SIGN
00161     0x00f2: None,       #  UNDEFINED
00162     0x00f3: 0x00be,     #  VULGAR FRACTION THREE QUARTERS
00163     0x00f4: 0x00b6,     #  PILCROW SIGN
00164     0x00f5: 0x00a7,     #  SECTION SIGN
00165     0x00f6: 0x00f7,     #  DIVISION SIGN
00166     0x00f7: 0x00b8,     #  CEDILLA
00167     0x00f8: 0x00b0,     #  DEGREE SIGN
00168     0x00f9: 0x00a8,     #  DIAERESIS
00169     0x00fa: 0x00b7,     #  MIDDLE DOT
00170     0x00fb: 0x00b9,     #  SUPERSCRIPT ONE
00171     0x00fc: 0x00b3,     #  SUPERSCRIPT THREE
00172     0x00fd: 0x00b2,     #  SUPERSCRIPT TWO
00173     0x00fe: 0x25a0,     #  BLACK SQUARE
00174     0x00ff: 0x00a0,     #  NO-BREAK SPACE
00175 })
00176 
00177 ### Decoding Table
00178 
00179 decoding_table = (
00180     '\x00'     #  0x0000 -> NULL
00181     '\x01'     #  0x0001 -> START OF HEADING
00182     '\x02'     #  0x0002 -> START OF TEXT
00183     '\x03'     #  0x0003 -> END OF TEXT
00184     '\x04'     #  0x0004 -> END OF TRANSMISSION
00185     '\x05'     #  0x0005 -> ENQUIRY
00186     '\x06'     #  0x0006 -> ACKNOWLEDGE
00187     '\x07'     #  0x0007 -> BELL
00188     '\x08'     #  0x0008 -> BACKSPACE
00189     '\t'       #  0x0009 -> HORIZONTAL TABULATION
00190     '\n'       #  0x000a -> LINE FEED
00191     '\x0b'     #  0x000b -> VERTICAL TABULATION
00192     '\x0c'     #  0x000c -> FORM FEED
00193     '\r'       #  0x000d -> CARRIAGE RETURN
00194     '\x0e'     #  0x000e -> SHIFT OUT
00195     '\x0f'     #  0x000f -> SHIFT IN
00196     '\x10'     #  0x0010 -> DATA LINK ESCAPE
00197     '\x11'     #  0x0011 -> DEVICE CONTROL ONE
00198     '\x12'     #  0x0012 -> DEVICE CONTROL TWO
00199     '\x13'     #  0x0013 -> DEVICE CONTROL THREE
00200     '\x14'     #  0x0014 -> DEVICE CONTROL FOUR
00201     '\x15'     #  0x0015 -> NEGATIVE ACKNOWLEDGE
00202     '\x16'     #  0x0016 -> SYNCHRONOUS IDLE
00203     '\x17'     #  0x0017 -> END OF TRANSMISSION BLOCK
00204     '\x18'     #  0x0018 -> CANCEL
00205     '\x19'     #  0x0019 -> END OF MEDIUM
00206     '\x1a'     #  0x001a -> SUBSTITUTE
00207     '\x1b'     #  0x001b -> ESCAPE
00208     '\x1c'     #  0x001c -> FILE SEPARATOR
00209     '\x1d'     #  0x001d -> GROUP SEPARATOR
00210     '\x1e'     #  0x001e -> RECORD SEPARATOR
00211     '\x1f'     #  0x001f -> UNIT SEPARATOR
00212     ' '        #  0x0020 -> SPACE
00213     '!'        #  0x0021 -> EXCLAMATION MARK
00214     '"'        #  0x0022 -> QUOTATION MARK
00215     '#'        #  0x0023 -> NUMBER SIGN
00216     '$'        #  0x0024 -> DOLLAR SIGN
00217     '%'        #  0x0025 -> PERCENT SIGN
00218     '&'        #  0x0026 -> AMPERSAND
00219     "'"        #  0x0027 -> APOSTROPHE
00220     '('        #  0x0028 -> LEFT PARENTHESIS
00221     ')'        #  0x0029 -> RIGHT PARENTHESIS
00222     '*'        #  0x002a -> ASTERISK
00223     '+'        #  0x002b -> PLUS SIGN
00224     ','        #  0x002c -> COMMA
00225     '-'        #  0x002d -> HYPHEN-MINUS
00226     '.'        #  0x002e -> FULL STOP
00227     '/'        #  0x002f -> SOLIDUS
00228     '0'        #  0x0030 -> DIGIT ZERO
00229     '1'        #  0x0031 -> DIGIT ONE
00230     '2'        #  0x0032 -> DIGIT TWO
00231     '3'        #  0x0033 -> DIGIT THREE
00232     '4'        #  0x0034 -> DIGIT FOUR
00233     '5'        #  0x0035 -> DIGIT FIVE
00234     '6'        #  0x0036 -> DIGIT SIX
00235     '7'        #  0x0037 -> DIGIT SEVEN
00236     '8'        #  0x0038 -> DIGIT EIGHT
00237     '9'        #  0x0039 -> DIGIT NINE
00238     ':'        #  0x003a -> COLON
00239     ';'        #  0x003b -> SEMICOLON
00240     '<'        #  0x003c -> LESS-THAN SIGN
00241     '='        #  0x003d -> EQUALS SIGN
00242     '>'        #  0x003e -> GREATER-THAN SIGN
00243     '?'        #  0x003f -> QUESTION MARK
00244     '@'        #  0x0040 -> COMMERCIAL AT
00245     'A'        #  0x0041 -> LATIN CAPITAL LETTER A
00246     'B'        #  0x0042 -> LATIN CAPITAL LETTER B
00247     'C'        #  0x0043 -> LATIN CAPITAL LETTER C
00248     'D'        #  0x0044 -> LATIN CAPITAL LETTER D
00249     'E'        #  0x0045 -> LATIN CAPITAL LETTER E
00250     'F'        #  0x0046 -> LATIN CAPITAL LETTER F
00251     'G'        #  0x0047 -> LATIN CAPITAL LETTER G
00252     'H'        #  0x0048 -> LATIN CAPITAL LETTER H
00253     'I'        #  0x0049 -> LATIN CAPITAL LETTER I
00254     'J'        #  0x004a -> LATIN CAPITAL LETTER J
00255     'K'        #  0x004b -> LATIN CAPITAL LETTER K
00256     'L'        #  0x004c -> LATIN CAPITAL LETTER L
00257     'M'        #  0x004d -> LATIN CAPITAL LETTER M
00258     'N'        #  0x004e -> LATIN CAPITAL LETTER N
00259     'O'        #  0x004f -> LATIN CAPITAL LETTER O
00260     'P'        #  0x0050 -> LATIN CAPITAL LETTER P
00261     'Q'        #  0x0051 -> LATIN CAPITAL LETTER Q
00262     'R'        #  0x0052 -> LATIN CAPITAL LETTER R
00263     'S'        #  0x0053 -> LATIN CAPITAL LETTER S
00264     'T'        #  0x0054 -> LATIN CAPITAL LETTER T
00265     'U'        #  0x0055 -> LATIN CAPITAL LETTER U
00266     'V'        #  0x0056 -> LATIN CAPITAL LETTER V
00267     'W'        #  0x0057 -> LATIN CAPITAL LETTER W
00268     'X'        #  0x0058 -> LATIN CAPITAL LETTER X
00269     'Y'        #  0x0059 -> LATIN CAPITAL LETTER Y
00270     'Z'        #  0x005a -> LATIN CAPITAL LETTER Z
00271     '['        #  0x005b -> LEFT SQUARE BRACKET
00272     '\\'       #  0x005c -> REVERSE SOLIDUS
00273     ']'        #  0x005d -> RIGHT SQUARE BRACKET
00274     '^'        #  0x005e -> CIRCUMFLEX ACCENT
00275     '_'        #  0x005f -> LOW LINE
00276     '`'        #  0x0060 -> GRAVE ACCENT
00277     'a'        #  0x0061 -> LATIN SMALL LETTER A
00278     'b'        #  0x0062 -> LATIN SMALL LETTER B
00279     'c'        #  0x0063 -> LATIN SMALL LETTER C
00280     'd'        #  0x0064 -> LATIN SMALL LETTER D
00281     'e'        #  0x0065 -> LATIN SMALL LETTER E
00282     'f'        #  0x0066 -> LATIN SMALL LETTER F
00283     'g'        #  0x0067 -> LATIN SMALL LETTER G
00284     'h'        #  0x0068 -> LATIN SMALL LETTER H
00285     'i'        #  0x0069 -> LATIN SMALL LETTER I
00286     'j'        #  0x006a -> LATIN SMALL LETTER J
00287     'k'        #  0x006b -> LATIN SMALL LETTER K
00288     'l'        #  0x006c -> LATIN SMALL LETTER L
00289     'm'        #  0x006d -> LATIN SMALL LETTER M
00290     'n'        #  0x006e -> LATIN SMALL LETTER N
00291     'o'        #  0x006f -> LATIN SMALL LETTER O
00292     'p'        #  0x0070 -> LATIN SMALL LETTER P
00293     'q'        #  0x0071 -> LATIN SMALL LETTER Q
00294     'r'        #  0x0072 -> LATIN SMALL LETTER R
00295     's'        #  0x0073 -> LATIN SMALL LETTER S
00296     't'        #  0x0074 -> LATIN SMALL LETTER T
00297     'u'        #  0x0075 -> LATIN SMALL LETTER U
00298     'v'        #  0x0076 -> LATIN SMALL LETTER V
00299     'w'        #  0x0077 -> LATIN SMALL LETTER W
00300     'x'        #  0x0078 -> LATIN SMALL LETTER X
00301     'y'        #  0x0079 -> LATIN SMALL LETTER Y
00302     'z'        #  0x007a -> LATIN SMALL LETTER Z
00303     '{'        #  0x007b -> LEFT CURLY BRACKET
00304     '|'        #  0x007c -> VERTICAL LINE
00305     '}'        #  0x007d -> RIGHT CURLY BRACKET
00306     '~'        #  0x007e -> TILDE
00307     '\x7f'     #  0x007f -> DELETE
00308     '\xc7'     #  0x0080 -> LATIN CAPITAL LETTER C WITH CEDILLA
00309     '\xfc'     #  0x0081 -> LATIN SMALL LETTER U WITH DIAERESIS
00310     '\xe9'     #  0x0082 -> LATIN SMALL LETTER E WITH ACUTE
00311     '\xe2'     #  0x0083 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
00312     '\xe4'     #  0x0084 -> LATIN SMALL LETTER A WITH DIAERESIS
00313     '\xe0'     #  0x0085 -> LATIN SMALL LETTER A WITH GRAVE
00314     '\xe5'     #  0x0086 -> LATIN SMALL LETTER A WITH RING ABOVE
00315     '\xe7'     #  0x0087 -> LATIN SMALL LETTER C WITH CEDILLA
00316     '\xea'     #  0x0088 -> LATIN SMALL LETTER E WITH CIRCUMFLEX
00317     '\xeb'     #  0x0089 -> LATIN SMALL LETTER E WITH DIAERESIS
00318     '\xe8'     #  0x008a -> LATIN SMALL LETTER E WITH GRAVE
00319     '\xef'     #  0x008b -> LATIN SMALL LETTER I WITH DIAERESIS
00320     '\xee'     #  0x008c -> LATIN SMALL LETTER I WITH CIRCUMFLEX
00321     '\u0131'   #  0x008d -> LATIN SMALL LETTER DOTLESS I
00322     '\xc4'     #  0x008e -> LATIN CAPITAL LETTER A WITH DIAERESIS
00323     '\xc5'     #  0x008f -> LATIN CAPITAL LETTER A WITH RING ABOVE
00324     '\xc9'     #  0x0090 -> LATIN CAPITAL LETTER E WITH ACUTE
00325     '\xe6'     #  0x0091 -> LATIN SMALL LIGATURE AE
00326     '\xc6'     #  0x0092 -> LATIN CAPITAL LIGATURE AE
00327     '\xf4'     #  0x0093 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
00328     '\xf6'     #  0x0094 -> LATIN SMALL LETTER O WITH DIAERESIS
00329     '\xf2'     #  0x0095 -> LATIN SMALL LETTER O WITH GRAVE
00330     '\xfb'     #  0x0096 -> LATIN SMALL LETTER U WITH CIRCUMFLEX
00331     '\xf9'     #  0x0097 -> LATIN SMALL LETTER U WITH GRAVE
00332     '\u0130'   #  0x0098 -> LATIN CAPITAL LETTER I WITH DOT ABOVE
00333     '\xd6'     #  0x0099 -> LATIN CAPITAL LETTER O WITH DIAERESIS
00334     '\xdc'     #  0x009a -> LATIN CAPITAL LETTER U WITH DIAERESIS
00335     '\xf8'     #  0x009b -> LATIN SMALL LETTER O WITH STROKE
00336     '\xa3'     #  0x009c -> POUND SIGN
00337     '\xd8'     #  0x009d -> LATIN CAPITAL LETTER O WITH STROKE
00338     '\u015e'   #  0x009e -> LATIN CAPITAL LETTER S WITH CEDILLA
00339     '\u015f'   #  0x009f -> LATIN SMALL LETTER S WITH CEDILLA
00340     '\xe1'     #  0x00a0 -> LATIN SMALL LETTER A WITH ACUTE
00341     '\xed'     #  0x00a1 -> LATIN SMALL LETTER I WITH ACUTE
00342     '\xf3'     #  0x00a2 -> LATIN SMALL LETTER O WITH ACUTE
00343     '\xfa'     #  0x00a3 -> LATIN SMALL LETTER U WITH ACUTE
00344     '\xf1'     #  0x00a4 -> LATIN SMALL LETTER N WITH TILDE
00345     '\xd1'     #  0x00a5 -> LATIN CAPITAL LETTER N WITH TILDE
00346     '\u011e'   #  0x00a6 -> LATIN CAPITAL LETTER G WITH BREVE
00347     '\u011f'   #  0x00a7 -> LATIN SMALL LETTER G WITH BREVE
00348     '\xbf'     #  0x00a8 -> INVERTED QUESTION MARK
00349     '\xae'     #  0x00a9 -> REGISTERED SIGN
00350     '\xac'     #  0x00aa -> NOT SIGN
00351     '\xbd'     #  0x00ab -> VULGAR FRACTION ONE HALF
00352     '\xbc'     #  0x00ac -> VULGAR FRACTION ONE QUARTER
00353     '\xa1'     #  0x00ad -> INVERTED EXCLAMATION MARK
00354     '\xab'     #  0x00ae -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
00355     '\xbb'     #  0x00af -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
00356     '\u2591'   #  0x00b0 -> LIGHT SHADE
00357     '\u2592'   #  0x00b1 -> MEDIUM SHADE
00358     '\u2593'   #  0x00b2 -> DARK SHADE
00359     '\u2502'   #  0x00b3 -> BOX DRAWINGS LIGHT VERTICAL
00360     '\u2524'   #  0x00b4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT
00361     '\xc1'     #  0x00b5 -> LATIN CAPITAL LETTER A WITH ACUTE
00362     '\xc2'     #  0x00b6 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
00363     '\xc0'     #  0x00b7 -> LATIN CAPITAL LETTER A WITH GRAVE
00364     '\xa9'     #  0x00b8 -> COPYRIGHT SIGN
00365     '\u2563'   #  0x00b9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT
00366     '\u2551'   #  0x00ba -> BOX DRAWINGS DOUBLE VERTICAL
00367     '\u2557'   #  0x00bb -> BOX DRAWINGS DOUBLE DOWN AND LEFT
00368     '\u255d'   #  0x00bc -> BOX DRAWINGS DOUBLE UP AND LEFT
00369     '\xa2'     #  0x00bd -> CENT SIGN
00370     '\xa5'     #  0x00be -> YEN SIGN
00371     '\u2510'   #  0x00bf -> BOX DRAWINGS LIGHT DOWN AND LEFT
00372     '\u2514'   #  0x00c0 -> BOX DRAWINGS LIGHT UP AND RIGHT
00373     '\u2534'   #  0x00c1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL
00374     '\u252c'   #  0x00c2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
00375     '\u251c'   #  0x00c3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT
00376     '\u2500'   #  0x00c4 -> BOX DRAWINGS LIGHT HORIZONTAL
00377     '\u253c'   #  0x00c5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
00378     '\xe3'     #  0x00c6 -> LATIN SMALL LETTER A WITH TILDE
00379     '\xc3'     #  0x00c7 -> LATIN CAPITAL LETTER A WITH TILDE
00380     '\u255a'   #  0x00c8 -> BOX DRAWINGS DOUBLE UP AND RIGHT
00381     '\u2554'   #  0x00c9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT
00382     '\u2569'   #  0x00ca -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL
00383     '\u2566'   #  0x00cb -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
00384     '\u2560'   #  0x00cc -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
00385     '\u2550'   #  0x00cd -> BOX DRAWINGS DOUBLE HORIZONTAL
00386     '\u256c'   #  0x00ce -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
00387     '\xa4'     #  0x00cf -> CURRENCY SIGN
00388     '\xba'     #  0x00d0 -> MASCULINE ORDINAL INDICATOR
00389     '\xaa'     #  0x00d1 -> FEMININE ORDINAL INDICATOR
00390     '\xca'     #  0x00d2 -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
00391     '\xcb'     #  0x00d3 -> LATIN CAPITAL LETTER E WITH DIAERESIS
00392     '\xc8'     #  0x00d4 -> LATIN CAPITAL LETTER E WITH GRAVE
00393     '\ufffe'   #  0x00d5 -> UNDEFINED
00394     '\xcd'     #  0x00d6 -> LATIN CAPITAL LETTER I WITH ACUTE
00395     '\xce'     #  0x00d7 -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
00396     '\xcf'     #  0x00d8 -> LATIN CAPITAL LETTER I WITH DIAERESIS
00397     '\u2518'   #  0x00d9 -> BOX DRAWINGS LIGHT UP AND LEFT
00398     '\u250c'   #  0x00da -> BOX DRAWINGS LIGHT DOWN AND RIGHT
00399     '\u2588'   #  0x00db -> FULL BLOCK
00400     '\u2584'   #  0x00dc -> LOWER HALF BLOCK
00401     '\xa6'     #  0x00dd -> BROKEN BAR
00402     '\xcc'     #  0x00de -> LATIN CAPITAL LETTER I WITH GRAVE
00403     '\u2580'   #  0x00df -> UPPER HALF BLOCK
00404     '\xd3'     #  0x00e0 -> LATIN CAPITAL LETTER O WITH ACUTE
00405     '\xdf'     #  0x00e1 -> LATIN SMALL LETTER SHARP S
00406     '\xd4'     #  0x00e2 -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
00407     '\xd2'     #  0x00e3 -> LATIN CAPITAL LETTER O WITH GRAVE
00408     '\xf5'     #  0x00e4 -> LATIN SMALL LETTER O WITH TILDE
00409     '\xd5'     #  0x00e5 -> LATIN CAPITAL LETTER O WITH TILDE
00410     '\xb5'     #  0x00e6 -> MICRO SIGN
00411     '\ufffe'   #  0x00e7 -> UNDEFINED
00412     '\xd7'     #  0x00e8 -> MULTIPLICATION SIGN
00413     '\xda'     #  0x00e9 -> LATIN CAPITAL LETTER U WITH ACUTE
00414     '\xdb'     #  0x00ea -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
00415     '\xd9'     #  0x00eb -> LATIN CAPITAL LETTER U WITH GRAVE
00416     '\xec'     #  0x00ec -> LATIN SMALL LETTER I WITH GRAVE
00417     '\xff'     #  0x00ed -> LATIN SMALL LETTER Y WITH DIAERESIS
00418     '\xaf'     #  0x00ee -> MACRON
00419     '\xb4'     #  0x00ef -> ACUTE ACCENT
00420     '\xad'     #  0x00f0 -> SOFT HYPHEN
00421     '\xb1'     #  0x00f1 -> PLUS-MINUS SIGN
00422     '\ufffe'   #  0x00f2 -> UNDEFINED
00423     '\xbe'     #  0x00f3 -> VULGAR FRACTION THREE QUARTERS
00424     '\xb6'     #  0x00f4 -> PILCROW SIGN
00425     '\xa7'     #  0x00f5 -> SECTION SIGN
00426     '\xf7'     #  0x00f6 -> DIVISION SIGN
00427     '\xb8'     #  0x00f7 -> CEDILLA
00428     '\xb0'     #  0x00f8 -> DEGREE SIGN
00429     '\xa8'     #  0x00f9 -> DIAERESIS
00430     '\xb7'     #  0x00fa -> MIDDLE DOT
00431     '\xb9'     #  0x00fb -> SUPERSCRIPT ONE
00432     '\xb3'     #  0x00fc -> SUPERSCRIPT THREE
00433     '\xb2'     #  0x00fd -> SUPERSCRIPT TWO
00434     '\u25a0'   #  0x00fe -> BLACK SQUARE
00435     '\xa0'     #  0x00ff -> NO-BREAK SPACE
00436 )
00437 
00438 ### Encoding Map
00439 
00440 encoding_map = {
00441     0x0000: 0x0000,     #  NULL
00442     0x0001: 0x0001,     #  START OF HEADING
00443     0x0002: 0x0002,     #  START OF TEXT
00444     0x0003: 0x0003,     #  END OF TEXT
00445     0x0004: 0x0004,     #  END OF TRANSMISSION
00446     0x0005: 0x0005,     #  ENQUIRY
00447     0x0006: 0x0006,     #  ACKNOWLEDGE
00448     0x0007: 0x0007,     #  BELL
00449     0x0008: 0x0008,     #  BACKSPACE
00450     0x0009: 0x0009,     #  HORIZONTAL TABULATION
00451     0x000a: 0x000a,     #  LINE FEED
00452     0x000b: 0x000b,     #  VERTICAL TABULATION
00453     0x000c: 0x000c,     #  FORM FEED
00454     0x000d: 0x000d,     #  CARRIAGE RETURN
00455     0x000e: 0x000e,     #  SHIFT OUT
00456     0x000f: 0x000f,     #  SHIFT IN
00457     0x0010: 0x0010,     #  DATA LINK ESCAPE
00458     0x0011: 0x0011,     #  DEVICE CONTROL ONE
00459     0x0012: 0x0012,     #  DEVICE CONTROL TWO
00460     0x0013: 0x0013,     #  DEVICE CONTROL THREE
00461     0x0014: 0x0014,     #  DEVICE CONTROL FOUR
00462     0x0015: 0x0015,     #  NEGATIVE ACKNOWLEDGE
00463     0x0016: 0x0016,     #  SYNCHRONOUS IDLE
00464     0x0017: 0x0017,     #  END OF TRANSMISSION BLOCK
00465     0x0018: 0x0018,     #  CANCEL
00466     0x0019: 0x0019,     #  END OF MEDIUM
00467     0x001a: 0x001a,     #  SUBSTITUTE
00468     0x001b: 0x001b,     #  ESCAPE
00469     0x001c: 0x001c,     #  FILE SEPARATOR
00470     0x001d: 0x001d,     #  GROUP SEPARATOR
00471     0x001e: 0x001e,     #  RECORD SEPARATOR
00472     0x001f: 0x001f,     #  UNIT SEPARATOR
00473     0x0020: 0x0020,     #  SPACE
00474     0x0021: 0x0021,     #  EXCLAMATION MARK
00475     0x0022: 0x0022,     #  QUOTATION MARK
00476     0x0023: 0x0023,     #  NUMBER SIGN
00477     0x0024: 0x0024,     #  DOLLAR SIGN
00478     0x0025: 0x0025,     #  PERCENT SIGN
00479     0x0026: 0x0026,     #  AMPERSAND
00480     0x0027: 0x0027,     #  APOSTROPHE
00481     0x0028: 0x0028,     #  LEFT PARENTHESIS
00482     0x0029: 0x0029,     #  RIGHT PARENTHESIS
00483     0x002a: 0x002a,     #  ASTERISK
00484     0x002b: 0x002b,     #  PLUS SIGN
00485     0x002c: 0x002c,     #  COMMA
00486     0x002d: 0x002d,     #  HYPHEN-MINUS
00487     0x002e: 0x002e,     #  FULL STOP
00488     0x002f: 0x002f,     #  SOLIDUS
00489     0x0030: 0x0030,     #  DIGIT ZERO
00490     0x0031: 0x0031,     #  DIGIT ONE
00491     0x0032: 0x0032,     #  DIGIT TWO
00492     0x0033: 0x0033,     #  DIGIT THREE
00493     0x0034: 0x0034,     #  DIGIT FOUR
00494     0x0035: 0x0035,     #  DIGIT FIVE
00495     0x0036: 0x0036,     #  DIGIT SIX
00496     0x0037: 0x0037,     #  DIGIT SEVEN
00497     0x0038: 0x0038,     #  DIGIT EIGHT
00498     0x0039: 0x0039,     #  DIGIT NINE
00499     0x003a: 0x003a,     #  COLON
00500     0x003b: 0x003b,     #  SEMICOLON
00501     0x003c: 0x003c,     #  LESS-THAN SIGN
00502     0x003d: 0x003d,     #  EQUALS SIGN
00503     0x003e: 0x003e,     #  GREATER-THAN SIGN
00504     0x003f: 0x003f,     #  QUESTION MARK
00505     0x0040: 0x0040,     #  COMMERCIAL AT
00506     0x0041: 0x0041,     #  LATIN CAPITAL LETTER A
00507     0x0042: 0x0042,     #  LATIN CAPITAL LETTER B
00508     0x0043: 0x0043,     #  LATIN CAPITAL LETTER C
00509     0x0044: 0x0044,     #  LATIN CAPITAL LETTER D
00510     0x0045: 0x0045,     #  LATIN CAPITAL LETTER E
00511     0x0046: 0x0046,     #  LATIN CAPITAL LETTER F
00512     0x0047: 0x0047,     #  LATIN CAPITAL LETTER G
00513     0x0048: 0x0048,     #  LATIN CAPITAL LETTER H
00514     0x0049: 0x0049,     #  LATIN CAPITAL LETTER I
00515     0x004a: 0x004a,     #  LATIN CAPITAL LETTER J
00516     0x004b: 0x004b,     #  LATIN CAPITAL LETTER K
00517     0x004c: 0x004c,     #  LATIN CAPITAL LETTER L
00518     0x004d: 0x004d,     #  LATIN CAPITAL LETTER M
00519     0x004e: 0x004e,     #  LATIN CAPITAL LETTER N
00520     0x004f: 0x004f,     #  LATIN CAPITAL LETTER O
00521     0x0050: 0x0050,     #  LATIN CAPITAL LETTER P
00522     0x0051: 0x0051,     #  LATIN CAPITAL LETTER Q
00523     0x0052: 0x0052,     #  LATIN CAPITAL LETTER R
00524     0x0053: 0x0053,     #  LATIN CAPITAL LETTER S
00525     0x0054: 0x0054,     #  LATIN CAPITAL LETTER T
00526     0x0055: 0x0055,     #  LATIN CAPITAL LETTER U
00527     0x0056: 0x0056,     #  LATIN CAPITAL LETTER V
00528     0x0057: 0x0057,     #  LATIN CAPITAL LETTER W
00529     0x0058: 0x0058,     #  LATIN CAPITAL LETTER X
00530     0x0059: 0x0059,     #  LATIN CAPITAL LETTER Y
00531     0x005a: 0x005a,     #  LATIN CAPITAL LETTER Z
00532     0x005b: 0x005b,     #  LEFT SQUARE BRACKET
00533     0x005c: 0x005c,     #  REVERSE SOLIDUS
00534     0x005d: 0x005d,     #  RIGHT SQUARE BRACKET
00535     0x005e: 0x005e,     #  CIRCUMFLEX ACCENT
00536     0x005f: 0x005f,     #  LOW LINE
00537     0x0060: 0x0060,     #  GRAVE ACCENT
00538     0x0061: 0x0061,     #  LATIN SMALL LETTER A
00539     0x0062: 0x0062,     #  LATIN SMALL LETTER B
00540     0x0063: 0x0063,     #  LATIN SMALL LETTER C
00541     0x0064: 0x0064,     #  LATIN SMALL LETTER D
00542     0x0065: 0x0065,     #  LATIN SMALL LETTER E
00543     0x0066: 0x0066,     #  LATIN SMALL LETTER F
00544     0x0067: 0x0067,     #  LATIN SMALL LETTER G
00545     0x0068: 0x0068,     #  LATIN SMALL LETTER H
00546     0x0069: 0x0069,     #  LATIN SMALL LETTER I
00547     0x006a: 0x006a,     #  LATIN SMALL LETTER J
00548     0x006b: 0x006b,     #  LATIN SMALL LETTER K
00549     0x006c: 0x006c,     #  LATIN SMALL LETTER L
00550     0x006d: 0x006d,     #  LATIN SMALL LETTER M
00551     0x006e: 0x006e,     #  LATIN SMALL LETTER N
00552     0x006f: 0x006f,     #  LATIN SMALL LETTER O
00553     0x0070: 0x0070,     #  LATIN SMALL LETTER P
00554     0x0071: 0x0071,     #  LATIN SMALL LETTER Q
00555     0x0072: 0x0072,     #  LATIN SMALL LETTER R
00556     0x0073: 0x0073,     #  LATIN SMALL LETTER S
00557     0x0074: 0x0074,     #  LATIN SMALL LETTER T
00558     0x0075: 0x0075,     #  LATIN SMALL LETTER U
00559     0x0076: 0x0076,     #  LATIN SMALL LETTER V
00560     0x0077: 0x0077,     #  LATIN SMALL LETTER W
00561     0x0078: 0x0078,     #  LATIN SMALL LETTER X
00562     0x0079: 0x0079,     #  LATIN SMALL LETTER Y
00563     0x007a: 0x007a,     #  LATIN SMALL LETTER Z
00564     0x007b: 0x007b,     #  LEFT CURLY BRACKET
00565     0x007c: 0x007c,     #  VERTICAL LINE
00566     0x007d: 0x007d,     #  RIGHT CURLY BRACKET
00567     0x007e: 0x007e,     #  TILDE
00568     0x007f: 0x007f,     #  DELETE
00569     0x00a0: 0x00ff,     #  NO-BREAK SPACE
00570     0x00a1: 0x00ad,     #  INVERTED EXCLAMATION MARK
00571     0x00a2: 0x00bd,     #  CENT SIGN
00572     0x00a3: 0x009c,     #  POUND SIGN
00573     0x00a4: 0x00cf,     #  CURRENCY SIGN
00574     0x00a5: 0x00be,     #  YEN SIGN
00575     0x00a6: 0x00dd,     #  BROKEN BAR
00576     0x00a7: 0x00f5,     #  SECTION SIGN
00577     0x00a8: 0x00f9,     #  DIAERESIS
00578     0x00a9: 0x00b8,     #  COPYRIGHT SIGN
00579     0x00aa: 0x00d1,     #  FEMININE ORDINAL INDICATOR
00580     0x00ab: 0x00ae,     #  LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
00581     0x00ac: 0x00aa,     #  NOT SIGN
00582     0x00ad: 0x00f0,     #  SOFT HYPHEN
00583     0x00ae: 0x00a9,     #  REGISTERED SIGN
00584     0x00af: 0x00ee,     #  MACRON
00585     0x00b0: 0x00f8,     #  DEGREE SIGN
00586     0x00b1: 0x00f1,     #  PLUS-MINUS SIGN
00587     0x00b2: 0x00fd,     #  SUPERSCRIPT TWO
00588     0x00b3: 0x00fc,     #  SUPERSCRIPT THREE
00589     0x00b4: 0x00ef,     #  ACUTE ACCENT
00590     0x00b5: 0x00e6,     #  MICRO SIGN
00591     0x00b6: 0x00f4,     #  PILCROW SIGN
00592     0x00b7: 0x00fa,     #  MIDDLE DOT
00593     0x00b8: 0x00f7,     #  CEDILLA
00594     0x00b9: 0x00fb,     #  SUPERSCRIPT ONE
00595     0x00ba: 0x00d0,     #  MASCULINE ORDINAL INDICATOR
00596     0x00bb: 0x00af,     #  RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
00597     0x00bc: 0x00ac,     #  VULGAR FRACTION ONE QUARTER
00598     0x00bd: 0x00ab,     #  VULGAR FRACTION ONE HALF
00599     0x00be: 0x00f3,     #  VULGAR FRACTION THREE QUARTERS
00600     0x00bf: 0x00a8,     #  INVERTED QUESTION MARK
00601     0x00c0: 0x00b7,     #  LATIN CAPITAL LETTER A WITH GRAVE
00602     0x00c1: 0x00b5,     #  LATIN CAPITAL LETTER A WITH ACUTE
00603     0x00c2: 0x00b6,     #  LATIN CAPITAL LETTER A WITH CIRCUMFLEX
00604     0x00c3: 0x00c7,     #  LATIN CAPITAL LETTER A WITH TILDE
00605     0x00c4: 0x008e,     #  LATIN CAPITAL LETTER A WITH DIAERESIS
00606     0x00c5: 0x008f,     #  LATIN CAPITAL LETTER A WITH RING ABOVE
00607     0x00c6: 0x0092,     #  LATIN CAPITAL LIGATURE AE
00608     0x00c7: 0x0080,     #  LATIN CAPITAL LETTER C WITH CEDILLA
00609     0x00c8: 0x00d4,     #  LATIN CAPITAL LETTER E WITH GRAVE
00610     0x00c9: 0x0090,     #  LATIN CAPITAL LETTER E WITH ACUTE
00611     0x00ca: 0x00d2,     #  LATIN CAPITAL LETTER E WITH CIRCUMFLEX
00612     0x00cb: 0x00d3,     #  LATIN CAPITAL LETTER E WITH DIAERESIS
00613     0x00cc: 0x00de,     #  LATIN CAPITAL LETTER I WITH GRAVE
00614     0x00cd: 0x00d6,     #  LATIN CAPITAL LETTER I WITH ACUTE
00615     0x00ce: 0x00d7,     #  LATIN CAPITAL LETTER I WITH CIRCUMFLEX
00616     0x00cf: 0x00d8,     #  LATIN CAPITAL LETTER I WITH DIAERESIS
00617     0x00d1: 0x00a5,     #  LATIN CAPITAL LETTER N WITH TILDE
00618     0x00d2: 0x00e3,     #  LATIN CAPITAL LETTER O WITH GRAVE
00619     0x00d3: 0x00e0,     #  LATIN CAPITAL LETTER O WITH ACUTE
00620     0x00d4: 0x00e2,     #  LATIN CAPITAL LETTER O WITH CIRCUMFLEX
00621     0x00d5: 0x00e5,     #  LATIN CAPITAL LETTER O WITH TILDE
00622     0x00d6: 0x0099,     #  LATIN CAPITAL LETTER O WITH DIAERESIS
00623     0x00d7: 0x00e8,     #  MULTIPLICATION SIGN
00624     0x00d8: 0x009d,     #  LATIN CAPITAL LETTER O WITH STROKE
00625     0x00d9: 0x00eb,     #  LATIN CAPITAL LETTER U WITH GRAVE
00626     0x00da: 0x00e9,     #  LATIN CAPITAL LETTER U WITH ACUTE
00627     0x00db: 0x00ea,     #  LATIN CAPITAL LETTER U WITH CIRCUMFLEX
00628     0x00dc: 0x009a,     #  LATIN CAPITAL LETTER U WITH DIAERESIS
00629     0x00df: 0x00e1,     #  LATIN SMALL LETTER SHARP S
00630     0x00e0: 0x0085,     #  LATIN SMALL LETTER A WITH GRAVE
00631     0x00e1: 0x00a0,     #  LATIN SMALL LETTER A WITH ACUTE
00632     0x00e2: 0x0083,     #  LATIN SMALL LETTER A WITH CIRCUMFLEX
00633     0x00e3: 0x00c6,     #  LATIN SMALL LETTER A WITH TILDE
00634     0x00e4: 0x0084,     #  LATIN SMALL LETTER A WITH DIAERESIS
00635     0x00e5: 0x0086,     #  LATIN SMALL LETTER A WITH RING ABOVE
00636     0x00e6: 0x0091,     #  LATIN SMALL LIGATURE AE
00637     0x00e7: 0x0087,     #  LATIN SMALL LETTER C WITH CEDILLA
00638     0x00e8: 0x008a,     #  LATIN SMALL LETTER E WITH GRAVE
00639     0x00e9: 0x0082,     #  LATIN SMALL LETTER E WITH ACUTE
00640     0x00ea: 0x0088,     #  LATIN SMALL LETTER E WITH CIRCUMFLEX
00641     0x00eb: 0x0089,     #  LATIN SMALL LETTER E WITH DIAERESIS
00642     0x00ec: 0x00ec,     #  LATIN SMALL LETTER I WITH GRAVE
00643     0x00ed: 0x00a1,     #  LATIN SMALL LETTER I WITH ACUTE
00644     0x00ee: 0x008c,     #  LATIN SMALL LETTER I WITH CIRCUMFLEX
00645     0x00ef: 0x008b,     #  LATIN SMALL LETTER I WITH DIAERESIS
00646     0x00f1: 0x00a4,     #  LATIN SMALL LETTER N WITH TILDE
00647     0x00f2: 0x0095,     #  LATIN SMALL LETTER O WITH GRAVE
00648     0x00f3: 0x00a2,     #  LATIN SMALL LETTER O WITH ACUTE
00649     0x00f4: 0x0093,     #  LATIN SMALL LETTER O WITH CIRCUMFLEX
00650     0x00f5: 0x00e4,     #  LATIN SMALL LETTER O WITH TILDE
00651     0x00f6: 0x0094,     #  LATIN SMALL LETTER O WITH DIAERESIS
00652     0x00f7: 0x00f6,     #  DIVISION SIGN
00653     0x00f8: 0x009b,     #  LATIN SMALL LETTER O WITH STROKE
00654     0x00f9: 0x0097,     #  LATIN SMALL LETTER U WITH GRAVE
00655     0x00fa: 0x00a3,     #  LATIN SMALL LETTER U WITH ACUTE
00656     0x00fb: 0x0096,     #  LATIN SMALL LETTER U WITH CIRCUMFLEX
00657     0x00fc: 0x0081,     #  LATIN SMALL LETTER U WITH DIAERESIS
00658     0x00ff: 0x00ed,     #  LATIN SMALL LETTER Y WITH DIAERESIS
00659     0x011e: 0x00a6,     #  LATIN CAPITAL LETTER G WITH BREVE
00660     0x011f: 0x00a7,     #  LATIN SMALL LETTER G WITH BREVE
00661     0x0130: 0x0098,     #  LATIN CAPITAL LETTER I WITH DOT ABOVE
00662     0x0131: 0x008d,     #  LATIN SMALL LETTER DOTLESS I
00663     0x015e: 0x009e,     #  LATIN CAPITAL LETTER S WITH CEDILLA
00664     0x015f: 0x009f,     #  LATIN SMALL LETTER S WITH CEDILLA
00665     0x2500: 0x00c4,     #  BOX DRAWINGS LIGHT HORIZONTAL
00666     0x2502: 0x00b3,     #  BOX DRAWINGS LIGHT VERTICAL
00667     0x250c: 0x00da,     #  BOX DRAWINGS LIGHT DOWN AND RIGHT
00668     0x2510: 0x00bf,     #  BOX DRAWINGS LIGHT DOWN AND LEFT
00669     0x2514: 0x00c0,     #  BOX DRAWINGS LIGHT UP AND RIGHT
00670     0x2518: 0x00d9,     #  BOX DRAWINGS LIGHT UP AND LEFT
00671     0x251c: 0x00c3,     #  BOX DRAWINGS LIGHT VERTICAL AND RIGHT
00672     0x2524: 0x00b4,     #  BOX DRAWINGS LIGHT VERTICAL AND LEFT
00673     0x252c: 0x00c2,     #  BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
00674     0x2534: 0x00c1,     #  BOX DRAWINGS LIGHT UP AND HORIZONTAL
00675     0x253c: 0x00c5,     #  BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
00676     0x2550: 0x00cd,     #  BOX DRAWINGS DOUBLE HORIZONTAL
00677     0x2551: 0x00ba,     #  BOX DRAWINGS DOUBLE VERTICAL
00678     0x2554: 0x00c9,     #  BOX DRAWINGS DOUBLE DOWN AND RIGHT
00679     0x2557: 0x00bb,     #  BOX DRAWINGS DOUBLE DOWN AND LEFT
00680     0x255a: 0x00c8,     #  BOX DRAWINGS DOUBLE UP AND RIGHT
00681     0x255d: 0x00bc,     #  BOX DRAWINGS DOUBLE UP AND LEFT
00682     0x2560: 0x00cc,     #  BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
00683     0x2563: 0x00b9,     #  BOX DRAWINGS DOUBLE VERTICAL AND LEFT
00684     0x2566: 0x00cb,     #  BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
00685     0x2569: 0x00ca,     #  BOX DRAWINGS DOUBLE UP AND HORIZONTAL
00686     0x256c: 0x00ce,     #  BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
00687     0x2580: 0x00df,     #  UPPER HALF BLOCK
00688     0x2584: 0x00dc,     #  LOWER HALF BLOCK
00689     0x2588: 0x00db,     #  FULL BLOCK
00690     0x2591: 0x00b0,     #  LIGHT SHADE
00691     0x2592: 0x00b1,     #  MEDIUM SHADE
00692     0x2593: 0x00b2,     #  DARK SHADE
00693     0x25a0: 0x00fe,     #  BLACK SQUARE
00694 }