cp866.py 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP866.TXT' with gencodec.py.
  2. """#"
  3. import codecs
  4. ### Codec APIs
  5. class Codec(codecs.Codec):
  6. def encode(self,input,errors='strict'):
  7. return codecs.charmap_encode(input,errors,encoding_map)
  8. def decode(self,input,errors='strict'):
  9. return codecs.charmap_decode(input,errors,decoding_table)
  10. class IncrementalEncoder(codecs.IncrementalEncoder):
  11. def encode(self, input, final=False):
  12. return codecs.charmap_encode(input,self.errors,encoding_map)[0]
  13. class IncrementalDecoder(codecs.IncrementalDecoder):
  14. def decode(self, input, final=False):
  15. return codecs.charmap_decode(input,self.errors,decoding_table)[0]
  16. class StreamWriter(Codec,codecs.StreamWriter):
  17. pass
  18. class StreamReader(Codec,codecs.StreamReader):
  19. pass
  20. ### encodings module API
  21. def getregentry():
  22. return codecs.CodecInfo(
  23. name='cp866',
  24. encode=Codec().encode,
  25. decode=Codec().decode,
  26. incrementalencoder=IncrementalEncoder,
  27. incrementaldecoder=IncrementalDecoder,
  28. streamreader=StreamReader,
  29. streamwriter=StreamWriter,
  30. )
  31. ### Decoding Map
  32. decoding_map = codecs.make_identity_dict(range(256))
  33. decoding_map.update({
  34. 0x0080: 0x0410, # CYRILLIC CAPITAL LETTER A
  35. 0x0081: 0x0411, # CYRILLIC CAPITAL LETTER BE
  36. 0x0082: 0x0412, # CYRILLIC CAPITAL LETTER VE
  37. 0x0083: 0x0413, # CYRILLIC CAPITAL LETTER GHE
  38. 0x0084: 0x0414, # CYRILLIC CAPITAL LETTER DE
  39. 0x0085: 0x0415, # CYRILLIC CAPITAL LETTER IE
  40. 0x0086: 0x0416, # CYRILLIC CAPITAL LETTER ZHE
  41. 0x0087: 0x0417, # CYRILLIC CAPITAL LETTER ZE
  42. 0x0088: 0x0418, # CYRILLIC CAPITAL LETTER I
  43. 0x0089: 0x0419, # CYRILLIC CAPITAL LETTER SHORT I
  44. 0x008a: 0x041a, # CYRILLIC CAPITAL LETTER KA
  45. 0x008b: 0x041b, # CYRILLIC CAPITAL LETTER EL
  46. 0x008c: 0x041c, # CYRILLIC CAPITAL LETTER EM
  47. 0x008d: 0x041d, # CYRILLIC CAPITAL LETTER EN
  48. 0x008e: 0x041e, # CYRILLIC CAPITAL LETTER O
  49. 0x008f: 0x041f, # CYRILLIC CAPITAL LETTER PE
  50. 0x0090: 0x0420, # CYRILLIC CAPITAL LETTER ER
  51. 0x0091: 0x0421, # CYRILLIC CAPITAL LETTER ES
  52. 0x0092: 0x0422, # CYRILLIC CAPITAL LETTER TE
  53. 0x0093: 0x0423, # CYRILLIC CAPITAL LETTER U
  54. 0x0094: 0x0424, # CYRILLIC CAPITAL LETTER EF
  55. 0x0095: 0x0425, # CYRILLIC CAPITAL LETTER HA
  56. 0x0096: 0x0426, # CYRILLIC CAPITAL LETTER TSE
  57. 0x0097: 0x0427, # CYRILLIC CAPITAL LETTER CHE
  58. 0x0098: 0x0428, # CYRILLIC CAPITAL LETTER SHA
  59. 0x0099: 0x0429, # CYRILLIC CAPITAL LETTER SHCHA
  60. 0x009a: 0x042a, # CYRILLIC CAPITAL LETTER HARD SIGN
  61. 0x009b: 0x042b, # CYRILLIC CAPITAL LETTER YERU
  62. 0x009c: 0x042c, # CYRILLIC CAPITAL LETTER SOFT SIGN
  63. 0x009d: 0x042d, # CYRILLIC CAPITAL LETTER E
  64. 0x009e: 0x042e, # CYRILLIC CAPITAL LETTER YU
  65. 0x009f: 0x042f, # CYRILLIC CAPITAL LETTER YA
  66. 0x00a0: 0x0430, # CYRILLIC SMALL LETTER A
  67. 0x00a1: 0x0431, # CYRILLIC SMALL LETTER BE
  68. 0x00a2: 0x0432, # CYRILLIC SMALL LETTER VE
  69. 0x00a3: 0x0433, # CYRILLIC SMALL LETTER GHE
  70. 0x00a4: 0x0434, # CYRILLIC SMALL LETTER DE
  71. 0x00a5: 0x0435, # CYRILLIC SMALL LETTER IE
  72. 0x00a6: 0x0436, # CYRILLIC SMALL LETTER ZHE
  73. 0x00a7: 0x0437, # CYRILLIC SMALL LETTER ZE
  74. 0x00a8: 0x0438, # CYRILLIC SMALL LETTER I
  75. 0x00a9: 0x0439, # CYRILLIC SMALL LETTER SHORT I
  76. 0x00aa: 0x043a, # CYRILLIC SMALL LETTER KA
  77. 0x00ab: 0x043b, # CYRILLIC SMALL LETTER EL
  78. 0x00ac: 0x043c, # CYRILLIC SMALL LETTER EM
  79. 0x00ad: 0x043d, # CYRILLIC SMALL LETTER EN
  80. 0x00ae: 0x043e, # CYRILLIC SMALL LETTER O
  81. 0x00af: 0x043f, # CYRILLIC SMALL LETTER PE
  82. 0x00b0: 0x2591, # LIGHT SHADE
  83. 0x00b1: 0x2592, # MEDIUM SHADE
  84. 0x00b2: 0x2593, # DARK SHADE
  85. 0x00b3: 0x2502, # BOX DRAWINGS LIGHT VERTICAL
  86. 0x00b4: 0x2524, # BOX DRAWINGS LIGHT VERTICAL AND LEFT
  87. 0x00b5: 0x2561, # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
  88. 0x00b6: 0x2562, # BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
  89. 0x00b7: 0x2556, # BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
  90. 0x00b8: 0x2555, # BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
  91. 0x00b9: 0x2563, # BOX DRAWINGS DOUBLE VERTICAL AND LEFT
  92. 0x00ba: 0x2551, # BOX DRAWINGS DOUBLE VERTICAL
  93. 0x00bb: 0x2557, # BOX DRAWINGS DOUBLE DOWN AND LEFT
  94. 0x00bc: 0x255d, # BOX DRAWINGS DOUBLE UP AND LEFT
  95. 0x00bd: 0x255c, # BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
  96. 0x00be: 0x255b, # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
  97. 0x00bf: 0x2510, # BOX DRAWINGS LIGHT DOWN AND LEFT
  98. 0x00c0: 0x2514, # BOX DRAWINGS LIGHT UP AND RIGHT
  99. 0x00c1: 0x2534, # BOX DRAWINGS LIGHT UP AND HORIZONTAL
  100. 0x00c2: 0x252c, # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
  101. 0x00c3: 0x251c, # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
  102. 0x00c4: 0x2500, # BOX DRAWINGS LIGHT HORIZONTAL
  103. 0x00c5: 0x253c, # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
  104. 0x00c6: 0x255e, # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
  105. 0x00c7: 0x255f, # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
  106. 0x00c8: 0x255a, # BOX DRAWINGS DOUBLE UP AND RIGHT
  107. 0x00c9: 0x2554, # BOX DRAWINGS DOUBLE DOWN AND RIGHT
  108. 0x00ca: 0x2569, # BOX DRAWINGS DOUBLE UP AND HORIZONTAL
  109. 0x00cb: 0x2566, # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
  110. 0x00cc: 0x2560, # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
  111. 0x00cd: 0x2550, # BOX DRAWINGS DOUBLE HORIZONTAL
  112. 0x00ce: 0x256c, # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
  113. 0x00cf: 0x2567, # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
  114. 0x00d0: 0x2568, # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
  115. 0x00d1: 0x2564, # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
  116. 0x00d2: 0x2565, # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
  117. 0x00d3: 0x2559, # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
  118. 0x00d4: 0x2558, # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
  119. 0x00d5: 0x2552, # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
  120. 0x00d6: 0x2553, # BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
  121. 0x00d7: 0x256b, # BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
  122. 0x00d8: 0x256a, # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
  123. 0x00d9: 0x2518, # BOX DRAWINGS LIGHT UP AND LEFT
  124. 0x00da: 0x250c, # BOX DRAWINGS LIGHT DOWN AND RIGHT
  125. 0x00db: 0x2588, # FULL BLOCK
  126. 0x00dc: 0x2584, # LOWER HALF BLOCK
  127. 0x00dd: 0x258c, # LEFT HALF BLOCK
  128. 0x00de: 0x2590, # RIGHT HALF BLOCK
  129. 0x00df: 0x2580, # UPPER HALF BLOCK
  130. 0x00e0: 0x0440, # CYRILLIC SMALL LETTER ER
  131. 0x00e1: 0x0441, # CYRILLIC SMALL LETTER ES
  132. 0x00e2: 0x0442, # CYRILLIC SMALL LETTER TE
  133. 0x00e3: 0x0443, # CYRILLIC SMALL LETTER U
  134. 0x00e4: 0x0444, # CYRILLIC SMALL LETTER EF
  135. 0x00e5: 0x0445, # CYRILLIC SMALL LETTER HA
  136. 0x00e6: 0x0446, # CYRILLIC SMALL LETTER TSE
  137. 0x00e7: 0x0447, # CYRILLIC SMALL LETTER CHE
  138. 0x00e8: 0x0448, # CYRILLIC SMALL LETTER SHA
  139. 0x00e9: 0x0449, # CYRILLIC SMALL LETTER SHCHA
  140. 0x00ea: 0x044a, # CYRILLIC SMALL LETTER HARD SIGN
  141. 0x00eb: 0x044b, # CYRILLIC SMALL LETTER YERU
  142. 0x00ec: 0x044c, # CYRILLIC SMALL LETTER SOFT SIGN
  143. 0x00ed: 0x044d, # CYRILLIC SMALL LETTER E
  144. 0x00ee: 0x044e, # CYRILLIC SMALL LETTER YU
  145. 0x00ef: 0x044f, # CYRILLIC SMALL LETTER YA
  146. 0x00f0: 0x0401, # CYRILLIC CAPITAL LETTER IO
  147. 0x00f1: 0x0451, # CYRILLIC SMALL LETTER IO
  148. 0x00f2: 0x0404, # CYRILLIC CAPITAL LETTER UKRAINIAN IE
  149. 0x00f3: 0x0454, # CYRILLIC SMALL LETTER UKRAINIAN IE
  150. 0x00f4: 0x0407, # CYRILLIC CAPITAL LETTER YI
  151. 0x00f5: 0x0457, # CYRILLIC SMALL LETTER YI
  152. 0x00f6: 0x040e, # CYRILLIC CAPITAL LETTER SHORT U
  153. 0x00f7: 0x045e, # CYRILLIC SMALL LETTER SHORT U
  154. 0x00f8: 0x00b0, # DEGREE SIGN
  155. 0x00f9: 0x2219, # BULLET OPERATOR
  156. 0x00fa: 0x00b7, # MIDDLE DOT
  157. 0x00fb: 0x221a, # SQUARE ROOT
  158. 0x00fc: 0x2116, # NUMERO SIGN
  159. 0x00fd: 0x00a4, # CURRENCY SIGN
  160. 0x00fe: 0x25a0, # BLACK SQUARE
  161. 0x00ff: 0x00a0, # NO-BREAK SPACE
  162. })
  163. ### Decoding Table
  164. decoding_table = (
  165. '\x00' # 0x0000 -> NULL
  166. '\x01' # 0x0001 -> START OF HEADING
  167. '\x02' # 0x0002 -> START OF TEXT
  168. '\x03' # 0x0003 -> END OF TEXT
  169. '\x04' # 0x0004 -> END OF TRANSMISSION
  170. '\x05' # 0x0005 -> ENQUIRY
  171. '\x06' # 0x0006 -> ACKNOWLEDGE
  172. '\x07' # 0x0007 -> BELL
  173. '\x08' # 0x0008 -> BACKSPACE
  174. '\t' # 0x0009 -> HORIZONTAL TABULATION
  175. '\n' # 0x000a -> LINE FEED
  176. '\x0b' # 0x000b -> VERTICAL TABULATION
  177. '\x0c' # 0x000c -> FORM FEED
  178. '\r' # 0x000d -> CARRIAGE RETURN
  179. '\x0e' # 0x000e -> SHIFT OUT
  180. '\x0f' # 0x000f -> SHIFT IN
  181. '\x10' # 0x0010 -> DATA LINK ESCAPE
  182. '\x11' # 0x0011 -> DEVICE CONTROL ONE
  183. '\x12' # 0x0012 -> DEVICE CONTROL TWO
  184. '\x13' # 0x0013 -> DEVICE CONTROL THREE
  185. '\x14' # 0x0014 -> DEVICE CONTROL FOUR
  186. '\x15' # 0x0015 -> NEGATIVE ACKNOWLEDGE
  187. '\x16' # 0x0016 -> SYNCHRONOUS IDLE
  188. '\x17' # 0x0017 -> END OF TRANSMISSION BLOCK
  189. '\x18' # 0x0018 -> CANCEL
  190. '\x19' # 0x0019 -> END OF MEDIUM
  191. '\x1a' # 0x001a -> SUBSTITUTE
  192. '\x1b' # 0x001b -> ESCAPE
  193. '\x1c' # 0x001c -> FILE SEPARATOR
  194. '\x1d' # 0x001d -> GROUP SEPARATOR
  195. '\x1e' # 0x001e -> RECORD SEPARATOR
  196. '\x1f' # 0x001f -> UNIT SEPARATOR
  197. ' ' # 0x0020 -> SPACE
  198. '!' # 0x0021 -> EXCLAMATION MARK
  199. '"' # 0x0022 -> QUOTATION MARK
  200. '#' # 0x0023 -> NUMBER SIGN
  201. '$' # 0x0024 -> DOLLAR SIGN
  202. '%' # 0x0025 -> PERCENT SIGN
  203. '&' # 0x0026 -> AMPERSAND
  204. "'" # 0x0027 -> APOSTROPHE
  205. '(' # 0x0028 -> LEFT PARENTHESIS
  206. ')' # 0x0029 -> RIGHT PARENTHESIS
  207. '*' # 0x002a -> ASTERISK
  208. '+' # 0x002b -> PLUS SIGN
  209. ',' # 0x002c -> COMMA
  210. '-' # 0x002d -> HYPHEN-MINUS
  211. '.' # 0x002e -> FULL STOP
  212. '/' # 0x002f -> SOLIDUS
  213. '0' # 0x0030 -> DIGIT ZERO
  214. '1' # 0x0031 -> DIGIT ONE
  215. '2' # 0x0032 -> DIGIT TWO
  216. '3' # 0x0033 -> DIGIT THREE
  217. '4' # 0x0034 -> DIGIT FOUR
  218. '5' # 0x0035 -> DIGIT FIVE
  219. '6' # 0x0036 -> DIGIT SIX
  220. '7' # 0x0037 -> DIGIT SEVEN
  221. '8' # 0x0038 -> DIGIT EIGHT
  222. '9' # 0x0039 -> DIGIT NINE
  223. ':' # 0x003a -> COLON
  224. ';' # 0x003b -> SEMICOLON
  225. '<' # 0x003c -> LESS-THAN SIGN
  226. '=' # 0x003d -> EQUALS SIGN
  227. '>' # 0x003e -> GREATER-THAN SIGN
  228. '?' # 0x003f -> QUESTION MARK
  229. '@' # 0x0040 -> COMMERCIAL AT
  230. 'A' # 0x0041 -> LATIN CAPITAL LETTER A
  231. 'B' # 0x0042 -> LATIN CAPITAL LETTER B
  232. 'C' # 0x0043 -> LATIN CAPITAL LETTER C
  233. 'D' # 0x0044 -> LATIN CAPITAL LETTER D
  234. 'E' # 0x0045 -> LATIN CAPITAL LETTER E
  235. 'F' # 0x0046 -> LATIN CAPITAL LETTER F
  236. 'G' # 0x0047 -> LATIN CAPITAL LETTER G
  237. 'H' # 0x0048 -> LATIN CAPITAL LETTER H
  238. 'I' # 0x0049 -> LATIN CAPITAL LETTER I
  239. 'J' # 0x004a -> LATIN CAPITAL LETTER J
  240. 'K' # 0x004b -> LATIN CAPITAL LETTER K
  241. 'L' # 0x004c -> LATIN CAPITAL LETTER L
  242. 'M' # 0x004d -> LATIN CAPITAL LETTER M
  243. 'N' # 0x004e -> LATIN CAPITAL LETTER N
  244. 'O' # 0x004f -> LATIN CAPITAL LETTER O
  245. 'P' # 0x0050 -> LATIN CAPITAL LETTER P
  246. 'Q' # 0x0051 -> LATIN CAPITAL LETTER Q
  247. 'R' # 0x0052 -> LATIN CAPITAL LETTER R
  248. 'S' # 0x0053 -> LATIN CAPITAL LETTER S
  249. 'T' # 0x0054 -> LATIN CAPITAL LETTER T
  250. 'U' # 0x0055 -> LATIN CAPITAL LETTER U
  251. 'V' # 0x0056 -> LATIN CAPITAL LETTER V
  252. 'W' # 0x0057 -> LATIN CAPITAL LETTER W
  253. 'X' # 0x0058 -> LATIN CAPITAL LETTER X
  254. 'Y' # 0x0059 -> LATIN CAPITAL LETTER Y
  255. 'Z' # 0x005a -> LATIN CAPITAL LETTER Z
  256. '[' # 0x005b -> LEFT SQUARE BRACKET
  257. '\\' # 0x005c -> REVERSE SOLIDUS
  258. ']' # 0x005d -> RIGHT SQUARE BRACKET
  259. '^' # 0x005e -> CIRCUMFLEX ACCENT
  260. '_' # 0x005f -> LOW LINE
  261. '`' # 0x0060 -> GRAVE ACCENT
  262. 'a' # 0x0061 -> LATIN SMALL LETTER A
  263. 'b' # 0x0062 -> LATIN SMALL LETTER B
  264. 'c' # 0x0063 -> LATIN SMALL LETTER C
  265. 'd' # 0x0064 -> LATIN SMALL LETTER D
  266. 'e' # 0x0065 -> LATIN SMALL LETTER E
  267. 'f' # 0x0066 -> LATIN SMALL LETTER F
  268. 'g' # 0x0067 -> LATIN SMALL LETTER G
  269. 'h' # 0x0068 -> LATIN SMALL LETTER H
  270. 'i' # 0x0069 -> LATIN SMALL LETTER I
  271. 'j' # 0x006a -> LATIN SMALL LETTER J
  272. 'k' # 0x006b -> LATIN SMALL LETTER K
  273. 'l' # 0x006c -> LATIN SMALL LETTER L
  274. 'm' # 0x006d -> LATIN SMALL LETTER M
  275. 'n' # 0x006e -> LATIN SMALL LETTER N
  276. 'o' # 0x006f -> LATIN SMALL LETTER O
  277. 'p' # 0x0070 -> LATIN SMALL LETTER P
  278. 'q' # 0x0071 -> LATIN SMALL LETTER Q
  279. 'r' # 0x0072 -> LATIN SMALL LETTER R
  280. 's' # 0x0073 -> LATIN SMALL LETTER S
  281. 't' # 0x0074 -> LATIN SMALL LETTER T
  282. 'u' # 0x0075 -> LATIN SMALL LETTER U
  283. 'v' # 0x0076 -> LATIN SMALL LETTER V
  284. 'w' # 0x0077 -> LATIN SMALL LETTER W
  285. 'x' # 0x0078 -> LATIN SMALL LETTER X
  286. 'y' # 0x0079 -> LATIN SMALL LETTER Y
  287. 'z' # 0x007a -> LATIN SMALL LETTER Z
  288. '{' # 0x007b -> LEFT CURLY BRACKET
  289. '|' # 0x007c -> VERTICAL LINE
  290. '}' # 0x007d -> RIGHT CURLY BRACKET
  291. '~' # 0x007e -> TILDE
  292. '\x7f' # 0x007f -> DELETE
  293. '\u0410' # 0x0080 -> CYRILLIC CAPITAL LETTER A
  294. '\u0411' # 0x0081 -> CYRILLIC CAPITAL LETTER BE
  295. '\u0412' # 0x0082 -> CYRILLIC CAPITAL LETTER VE
  296. '\u0413' # 0x0083 -> CYRILLIC CAPITAL LETTER GHE
  297. '\u0414' # 0x0084 -> CYRILLIC CAPITAL LETTER DE
  298. '\u0415' # 0x0085 -> CYRILLIC CAPITAL LETTER IE
  299. '\u0416' # 0x0086 -> CYRILLIC CAPITAL LETTER ZHE
  300. '\u0417' # 0x0087 -> CYRILLIC CAPITAL LETTER ZE
  301. '\u0418' # 0x0088 -> CYRILLIC CAPITAL LETTER I
  302. '\u0419' # 0x0089 -> CYRILLIC CAPITAL LETTER SHORT I
  303. '\u041a' # 0x008a -> CYRILLIC CAPITAL LETTER KA
  304. '\u041b' # 0x008b -> CYRILLIC CAPITAL LETTER EL
  305. '\u041c' # 0x008c -> CYRILLIC CAPITAL LETTER EM
  306. '\u041d' # 0x008d -> CYRILLIC CAPITAL LETTER EN
  307. '\u041e' # 0x008e -> CYRILLIC CAPITAL LETTER O
  308. '\u041f' # 0x008f -> CYRILLIC CAPITAL LETTER PE
  309. '\u0420' # 0x0090 -> CYRILLIC CAPITAL LETTER ER
  310. '\u0421' # 0x0091 -> CYRILLIC CAPITAL LETTER ES
  311. '\u0422' # 0x0092 -> CYRILLIC CAPITAL LETTER TE
  312. '\u0423' # 0x0093 -> CYRILLIC CAPITAL LETTER U
  313. '\u0424' # 0x0094 -> CYRILLIC CAPITAL LETTER EF
  314. '\u0425' # 0x0095 -> CYRILLIC CAPITAL LETTER HA
  315. '\u0426' # 0x0096 -> CYRILLIC CAPITAL LETTER TSE
  316. '\u0427' # 0x0097 -> CYRILLIC CAPITAL LETTER CHE
  317. '\u0428' # 0x0098 -> CYRILLIC CAPITAL LETTER SHA
  318. '\u0429' # 0x0099 -> CYRILLIC CAPITAL LETTER SHCHA
  319. '\u042a' # 0x009a -> CYRILLIC CAPITAL LETTER HARD SIGN
  320. '\u042b' # 0x009b -> CYRILLIC CAPITAL LETTER YERU
  321. '\u042c' # 0x009c -> CYRILLIC CAPITAL LETTER SOFT SIGN
  322. '\u042d' # 0x009d -> CYRILLIC CAPITAL LETTER E
  323. '\u042e' # 0x009e -> CYRILLIC CAPITAL LETTER YU
  324. '\u042f' # 0x009f -> CYRILLIC CAPITAL LETTER YA
  325. '\u0430' # 0x00a0 -> CYRILLIC SMALL LETTER A
  326. '\u0431' # 0x00a1 -> CYRILLIC SMALL LETTER BE
  327. '\u0432' # 0x00a2 -> CYRILLIC SMALL LETTER VE
  328. '\u0433' # 0x00a3 -> CYRILLIC SMALL LETTER GHE
  329. '\u0434' # 0x00a4 -> CYRILLIC SMALL LETTER DE
  330. '\u0435' # 0x00a5 -> CYRILLIC SMALL LETTER IE
  331. '\u0436' # 0x00a6 -> CYRILLIC SMALL LETTER ZHE
  332. '\u0437' # 0x00a7 -> CYRILLIC SMALL LETTER ZE
  333. '\u0438' # 0x00a8 -> CYRILLIC SMALL LETTER I
  334. '\u0439' # 0x00a9 -> CYRILLIC SMALL LETTER SHORT I
  335. '\u043a' # 0x00aa -> CYRILLIC SMALL LETTER KA
  336. '\u043b' # 0x00ab -> CYRILLIC SMALL LETTER EL
  337. '\u043c' # 0x00ac -> CYRILLIC SMALL LETTER EM
  338. '\u043d' # 0x00ad -> CYRILLIC SMALL LETTER EN
  339. '\u043e' # 0x00ae -> CYRILLIC SMALL LETTER O
  340. '\u043f' # 0x00af -> CYRILLIC SMALL LETTER PE
  341. '\u2591' # 0x00b0 -> LIGHT SHADE
  342. '\u2592' # 0x00b1 -> MEDIUM SHADE
  343. '\u2593' # 0x00b2 -> DARK SHADE
  344. '\u2502' # 0x00b3 -> BOX DRAWINGS LIGHT VERTICAL
  345. '\u2524' # 0x00b4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT
  346. '\u2561' # 0x00b5 -> BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
  347. '\u2562' # 0x00b6 -> BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
  348. '\u2556' # 0x00b7 -> BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
  349. '\u2555' # 0x00b8 -> BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
  350. '\u2563' # 0x00b9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT
  351. '\u2551' # 0x00ba -> BOX DRAWINGS DOUBLE VERTICAL
  352. '\u2557' # 0x00bb -> BOX DRAWINGS DOUBLE DOWN AND LEFT
  353. '\u255d' # 0x00bc -> BOX DRAWINGS DOUBLE UP AND LEFT
  354. '\u255c' # 0x00bd -> BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
  355. '\u255b' # 0x00be -> BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
  356. '\u2510' # 0x00bf -> BOX DRAWINGS LIGHT DOWN AND LEFT
  357. '\u2514' # 0x00c0 -> BOX DRAWINGS LIGHT UP AND RIGHT
  358. '\u2534' # 0x00c1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL
  359. '\u252c' # 0x00c2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
  360. '\u251c' # 0x00c3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT
  361. '\u2500' # 0x00c4 -> BOX DRAWINGS LIGHT HORIZONTAL
  362. '\u253c' # 0x00c5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
  363. '\u255e' # 0x00c6 -> BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
  364. '\u255f' # 0x00c7 -> BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
  365. '\u255a' # 0x00c8 -> BOX DRAWINGS DOUBLE UP AND RIGHT
  366. '\u2554' # 0x00c9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT
  367. '\u2569' # 0x00ca -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL
  368. '\u2566' # 0x00cb -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
  369. '\u2560' # 0x00cc -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
  370. '\u2550' # 0x00cd -> BOX DRAWINGS DOUBLE HORIZONTAL
  371. '\u256c' # 0x00ce -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
  372. '\u2567' # 0x00cf -> BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
  373. '\u2568' # 0x00d0 -> BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
  374. '\u2564' # 0x00d1 -> BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
  375. '\u2565' # 0x00d2 -> BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
  376. '\u2559' # 0x00d3 -> BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
  377. '\u2558' # 0x00d4 -> BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
  378. '\u2552' # 0x00d5 -> BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
  379. '\u2553' # 0x00d6 -> BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
  380. '\u256b' # 0x00d7 -> BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
  381. '\u256a' # 0x00d8 -> BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
  382. '\u2518' # 0x00d9 -> BOX DRAWINGS LIGHT UP AND LEFT
  383. '\u250c' # 0x00da -> BOX DRAWINGS LIGHT DOWN AND RIGHT
  384. '\u2588' # 0x00db -> FULL BLOCK
  385. '\u2584' # 0x00dc -> LOWER HALF BLOCK
  386. '\u258c' # 0x00dd -> LEFT HALF BLOCK
  387. '\u2590' # 0x00de -> RIGHT HALF BLOCK
  388. '\u2580' # 0x00df -> UPPER HALF BLOCK
  389. '\u0440' # 0x00e0 -> CYRILLIC SMALL LETTER ER
  390. '\u0441' # 0x00e1 -> CYRILLIC SMALL LETTER ES
  391. '\u0442' # 0x00e2 -> CYRILLIC SMALL LETTER TE
  392. '\u0443' # 0x00e3 -> CYRILLIC SMALL LETTER U
  393. '\u0444' # 0x00e4 -> CYRILLIC SMALL LETTER EF
  394. '\u0445' # 0x00e5 -> CYRILLIC SMALL LETTER HA
  395. '\u0446' # 0x00e6 -> CYRILLIC SMALL LETTER TSE
  396. '\u0447' # 0x00e7 -> CYRILLIC SMALL LETTER CHE
  397. '\u0448' # 0x00e8 -> CYRILLIC SMALL LETTER SHA
  398. '\u0449' # 0x00e9 -> CYRILLIC SMALL LETTER SHCHA
  399. '\u044a' # 0x00ea -> CYRILLIC SMALL LETTER HARD SIGN
  400. '\u044b' # 0x00eb -> CYRILLIC SMALL LETTER YERU
  401. '\u044c' # 0x00ec -> CYRILLIC SMALL LETTER SOFT SIGN
  402. '\u044d' # 0x00ed -> CYRILLIC SMALL LETTER E
  403. '\u044e' # 0x00ee -> CYRILLIC SMALL LETTER YU
  404. '\u044f' # 0x00ef -> CYRILLIC SMALL LETTER YA
  405. '\u0401' # 0x00f0 -> CYRILLIC CAPITAL LETTER IO
  406. '\u0451' # 0x00f1 -> CYRILLIC SMALL LETTER IO
  407. '\u0404' # 0x00f2 -> CYRILLIC CAPITAL LETTER UKRAINIAN IE
  408. '\u0454' # 0x00f3 -> CYRILLIC SMALL LETTER UKRAINIAN IE
  409. '\u0407' # 0x00f4 -> CYRILLIC CAPITAL LETTER YI
  410. '\u0457' # 0x00f5 -> CYRILLIC SMALL LETTER YI
  411. '\u040e' # 0x00f6 -> CYRILLIC CAPITAL LETTER SHORT U
  412. '\u045e' # 0x00f7 -> CYRILLIC SMALL LETTER SHORT U
  413. '\xb0' # 0x00f8 -> DEGREE SIGN
  414. '\u2219' # 0x00f9 -> BULLET OPERATOR
  415. '\xb7' # 0x00fa -> MIDDLE DOT
  416. '\u221a' # 0x00fb -> SQUARE ROOT
  417. '\u2116' # 0x00fc -> NUMERO SIGN
  418. '\xa4' # 0x00fd -> CURRENCY SIGN
  419. '\u25a0' # 0x00fe -> BLACK SQUARE
  420. '\xa0' # 0x00ff -> NO-BREAK SPACE
  421. )
  422. ### Encoding Map
  423. encoding_map = {
  424. 0x0000: 0x0000, # NULL
  425. 0x0001: 0x0001, # START OF HEADING
  426. 0x0002: 0x0002, # START OF TEXT
  427. 0x0003: 0x0003, # END OF TEXT
  428. 0x0004: 0x0004, # END OF TRANSMISSION
  429. 0x0005: 0x0005, # ENQUIRY
  430. 0x0006: 0x0006, # ACKNOWLEDGE
  431. 0x0007: 0x0007, # BELL
  432. 0x0008: 0x0008, # BACKSPACE
  433. 0x0009: 0x0009, # HORIZONTAL TABULATION
  434. 0x000a: 0x000a, # LINE FEED
  435. 0x000b: 0x000b, # VERTICAL TABULATION
  436. 0x000c: 0x000c, # FORM FEED
  437. 0x000d: 0x000d, # CARRIAGE RETURN
  438. 0x000e: 0x000e, # SHIFT OUT
  439. 0x000f: 0x000f, # SHIFT IN
  440. 0x0010: 0x0010, # DATA LINK ESCAPE
  441. 0x0011: 0x0011, # DEVICE CONTROL ONE
  442. 0x0012: 0x0012, # DEVICE CONTROL TWO
  443. 0x0013: 0x0013, # DEVICE CONTROL THREE
  444. 0x0014: 0x0014, # DEVICE CONTROL FOUR
  445. 0x0015: 0x0015, # NEGATIVE ACKNOWLEDGE
  446. 0x0016: 0x0016, # SYNCHRONOUS IDLE
  447. 0x0017: 0x0017, # END OF TRANSMISSION BLOCK
  448. 0x0018: 0x0018, # CANCEL
  449. 0x0019: 0x0019, # END OF MEDIUM
  450. 0x001a: 0x001a, # SUBSTITUTE
  451. 0x001b: 0x001b, # ESCAPE
  452. 0x001c: 0x001c, # FILE SEPARATOR
  453. 0x001d: 0x001d, # GROUP SEPARATOR
  454. 0x001e: 0x001e, # RECORD SEPARATOR
  455. 0x001f: 0x001f, # UNIT SEPARATOR
  456. 0x0020: 0x0020, # SPACE
  457. 0x0021: 0x0021, # EXCLAMATION MARK
  458. 0x0022: 0x0022, # QUOTATION MARK
  459. 0x0023: 0x0023, # NUMBER SIGN
  460. 0x0024: 0x0024, # DOLLAR SIGN
  461. 0x0025: 0x0025, # PERCENT SIGN
  462. 0x0026: 0x0026, # AMPERSAND
  463. 0x0027: 0x0027, # APOSTROPHE
  464. 0x0028: 0x0028, # LEFT PARENTHESIS
  465. 0x0029: 0x0029, # RIGHT PARENTHESIS
  466. 0x002a: 0x002a, # ASTERISK
  467. 0x002b: 0x002b, # PLUS SIGN
  468. 0x002c: 0x002c, # COMMA
  469. 0x002d: 0x002d, # HYPHEN-MINUS
  470. 0x002e: 0x002e, # FULL STOP
  471. 0x002f: 0x002f, # SOLIDUS
  472. 0x0030: 0x0030, # DIGIT ZERO
  473. 0x0031: 0x0031, # DIGIT ONE
  474. 0x0032: 0x0032, # DIGIT TWO
  475. 0x0033: 0x0033, # DIGIT THREE
  476. 0x0034: 0x0034, # DIGIT FOUR
  477. 0x0035: 0x0035, # DIGIT FIVE
  478. 0x0036: 0x0036, # DIGIT SIX
  479. 0x0037: 0x0037, # DIGIT SEVEN
  480. 0x0038: 0x0038, # DIGIT EIGHT
  481. 0x0039: 0x0039, # DIGIT NINE
  482. 0x003a: 0x003a, # COLON
  483. 0x003b: 0x003b, # SEMICOLON
  484. 0x003c: 0x003c, # LESS-THAN SIGN
  485. 0x003d: 0x003d, # EQUALS SIGN
  486. 0x003e: 0x003e, # GREATER-THAN SIGN
  487. 0x003f: 0x003f, # QUESTION MARK
  488. 0x0040: 0x0040, # COMMERCIAL AT
  489. 0x0041: 0x0041, # LATIN CAPITAL LETTER A
  490. 0x0042: 0x0042, # LATIN CAPITAL LETTER B
  491. 0x0043: 0x0043, # LATIN CAPITAL LETTER C
  492. 0x0044: 0x0044, # LATIN CAPITAL LETTER D
  493. 0x0045: 0x0045, # LATIN CAPITAL LETTER E
  494. 0x0046: 0x0046, # LATIN CAPITAL LETTER F
  495. 0x0047: 0x0047, # LATIN CAPITAL LETTER G
  496. 0x0048: 0x0048, # LATIN CAPITAL LETTER H
  497. 0x0049: 0x0049, # LATIN CAPITAL LETTER I
  498. 0x004a: 0x004a, # LATIN CAPITAL LETTER J
  499. 0x004b: 0x004b, # LATIN CAPITAL LETTER K
  500. 0x004c: 0x004c, # LATIN CAPITAL LETTER L
  501. 0x004d: 0x004d, # LATIN CAPITAL LETTER M
  502. 0x004e: 0x004e, # LATIN CAPITAL LETTER N
  503. 0x004f: 0x004f, # LATIN CAPITAL LETTER O
  504. 0x0050: 0x0050, # LATIN CAPITAL LETTER P
  505. 0x0051: 0x0051, # LATIN CAPITAL LETTER Q
  506. 0x0052: 0x0052, # LATIN CAPITAL LETTER R
  507. 0x0053: 0x0053, # LATIN CAPITAL LETTER S
  508. 0x0054: 0x0054, # LATIN CAPITAL LETTER T
  509. 0x0055: 0x0055, # LATIN CAPITAL LETTER U
  510. 0x0056: 0x0056, # LATIN CAPITAL LETTER V
  511. 0x0057: 0x0057, # LATIN CAPITAL LETTER W
  512. 0x0058: 0x0058, # LATIN CAPITAL LETTER X
  513. 0x0059: 0x0059, # LATIN CAPITAL LETTER Y
  514. 0x005a: 0x005a, # LATIN CAPITAL LETTER Z
  515. 0x005b: 0x005b, # LEFT SQUARE BRACKET
  516. 0x005c: 0x005c, # REVERSE SOLIDUS
  517. 0x005d: 0x005d, # RIGHT SQUARE BRACKET
  518. 0x005e: 0x005e, # CIRCUMFLEX ACCENT
  519. 0x005f: 0x005f, # LOW LINE
  520. 0x0060: 0x0060, # GRAVE ACCENT
  521. 0x0061: 0x0061, # LATIN SMALL LETTER A
  522. 0x0062: 0x0062, # LATIN SMALL LETTER B
  523. 0x0063: 0x0063, # LATIN SMALL LETTER C
  524. 0x0064: 0x0064, # LATIN SMALL LETTER D
  525. 0x0065: 0x0065, # LATIN SMALL LETTER E
  526. 0x0066: 0x0066, # LATIN SMALL LETTER F
  527. 0x0067: 0x0067, # LATIN SMALL LETTER G
  528. 0x0068: 0x0068, # LATIN SMALL LETTER H
  529. 0x0069: 0x0069, # LATIN SMALL LETTER I
  530. 0x006a: 0x006a, # LATIN SMALL LETTER J
  531. 0x006b: 0x006b, # LATIN SMALL LETTER K
  532. 0x006c: 0x006c, # LATIN SMALL LETTER L
  533. 0x006d: 0x006d, # LATIN SMALL LETTER M
  534. 0x006e: 0x006e, # LATIN SMALL LETTER N
  535. 0x006f: 0x006f, # LATIN SMALL LETTER O
  536. 0x0070: 0x0070, # LATIN SMALL LETTER P
  537. 0x0071: 0x0071, # LATIN SMALL LETTER Q
  538. 0x0072: 0x0072, # LATIN SMALL LETTER R
  539. 0x0073: 0x0073, # LATIN SMALL LETTER S
  540. 0x0074: 0x0074, # LATIN SMALL LETTER T
  541. 0x0075: 0x0075, # LATIN SMALL LETTER U
  542. 0x0076: 0x0076, # LATIN SMALL LETTER V
  543. 0x0077: 0x0077, # LATIN SMALL LETTER W
  544. 0x0078: 0x0078, # LATIN SMALL LETTER X
  545. 0x0079: 0x0079, # LATIN SMALL LETTER Y
  546. 0x007a: 0x007a, # LATIN SMALL LETTER Z
  547. 0x007b: 0x007b, # LEFT CURLY BRACKET
  548. 0x007c: 0x007c, # VERTICAL LINE
  549. 0x007d: 0x007d, # RIGHT CURLY BRACKET
  550. 0x007e: 0x007e, # TILDE
  551. 0x007f: 0x007f, # DELETE
  552. 0x00a0: 0x00ff, # NO-BREAK SPACE
  553. 0x00a4: 0x00fd, # CURRENCY SIGN
  554. 0x00b0: 0x00f8, # DEGREE SIGN
  555. 0x00b7: 0x00fa, # MIDDLE DOT
  556. 0x0401: 0x00f0, # CYRILLIC CAPITAL LETTER IO
  557. 0x0404: 0x00f2, # CYRILLIC CAPITAL LETTER UKRAINIAN IE
  558. 0x0407: 0x00f4, # CYRILLIC CAPITAL LETTER YI
  559. 0x040e: 0x00f6, # CYRILLIC CAPITAL LETTER SHORT U
  560. 0x0410: 0x0080, # CYRILLIC CAPITAL LETTER A
  561. 0x0411: 0x0081, # CYRILLIC CAPITAL LETTER BE
  562. 0x0412: 0x0082, # CYRILLIC CAPITAL LETTER VE
  563. 0x0413: 0x0083, # CYRILLIC CAPITAL LETTER GHE
  564. 0x0414: 0x0084, # CYRILLIC CAPITAL LETTER DE
  565. 0x0415: 0x0085, # CYRILLIC CAPITAL LETTER IE
  566. 0x0416: 0x0086, # CYRILLIC CAPITAL LETTER ZHE
  567. 0x0417: 0x0087, # CYRILLIC CAPITAL LETTER ZE
  568. 0x0418: 0x0088, # CYRILLIC CAPITAL LETTER I
  569. 0x0419: 0x0089, # CYRILLIC CAPITAL LETTER SHORT I
  570. 0x041a: 0x008a, # CYRILLIC CAPITAL LETTER KA
  571. 0x041b: 0x008b, # CYRILLIC CAPITAL LETTER EL
  572. 0x041c: 0x008c, # CYRILLIC CAPITAL LETTER EM
  573. 0x041d: 0x008d, # CYRILLIC CAPITAL LETTER EN
  574. 0x041e: 0x008e, # CYRILLIC CAPITAL LETTER O
  575. 0x041f: 0x008f, # CYRILLIC CAPITAL LETTER PE
  576. 0x0420: 0x0090, # CYRILLIC CAPITAL LETTER ER
  577. 0x0421: 0x0091, # CYRILLIC CAPITAL LETTER ES
  578. 0x0422: 0x0092, # CYRILLIC CAPITAL LETTER TE
  579. 0x0423: 0x0093, # CYRILLIC CAPITAL LETTER U
  580. 0x0424: 0x0094, # CYRILLIC CAPITAL LETTER EF
  581. 0x0425: 0x0095, # CYRILLIC CAPITAL LETTER HA
  582. 0x0426: 0x0096, # CYRILLIC CAPITAL LETTER TSE
  583. 0x0427: 0x0097, # CYRILLIC CAPITAL LETTER CHE
  584. 0x0428: 0x0098, # CYRILLIC CAPITAL LETTER SHA
  585. 0x0429: 0x0099, # CYRILLIC CAPITAL LETTER SHCHA
  586. 0x042a: 0x009a, # CYRILLIC CAPITAL LETTER HARD SIGN
  587. 0x042b: 0x009b, # CYRILLIC CAPITAL LETTER YERU
  588. 0x042c: 0x009c, # CYRILLIC CAPITAL LETTER SOFT SIGN
  589. 0x042d: 0x009d, # CYRILLIC CAPITAL LETTER E
  590. 0x042e: 0x009e, # CYRILLIC CAPITAL LETTER YU
  591. 0x042f: 0x009f, # CYRILLIC CAPITAL LETTER YA
  592. 0x0430: 0x00a0, # CYRILLIC SMALL LETTER A
  593. 0x0431: 0x00a1, # CYRILLIC SMALL LETTER BE
  594. 0x0432: 0x00a2, # CYRILLIC SMALL LETTER VE
  595. 0x0433: 0x00a3, # CYRILLIC SMALL LETTER GHE
  596. 0x0434: 0x00a4, # CYRILLIC SMALL LETTER DE
  597. 0x0435: 0x00a5, # CYRILLIC SMALL LETTER IE
  598. 0x0436: 0x00a6, # CYRILLIC SMALL LETTER ZHE
  599. 0x0437: 0x00a7, # CYRILLIC SMALL LETTER ZE
  600. 0x0438: 0x00a8, # CYRILLIC SMALL LETTER I
  601. 0x0439: 0x00a9, # CYRILLIC SMALL LETTER SHORT I
  602. 0x043a: 0x00aa, # CYRILLIC SMALL LETTER KA
  603. 0x043b: 0x00ab, # CYRILLIC SMALL LETTER EL
  604. 0x043c: 0x00ac, # CYRILLIC SMALL LETTER EM
  605. 0x043d: 0x00ad, # CYRILLIC SMALL LETTER EN
  606. 0x043e: 0x00ae, # CYRILLIC SMALL LETTER O
  607. 0x043f: 0x00af, # CYRILLIC SMALL LETTER PE
  608. 0x0440: 0x00e0, # CYRILLIC SMALL LETTER ER
  609. 0x0441: 0x00e1, # CYRILLIC SMALL LETTER ES
  610. 0x0442: 0x00e2, # CYRILLIC SMALL LETTER TE
  611. 0x0443: 0x00e3, # CYRILLIC SMALL LETTER U
  612. 0x0444: 0x00e4, # CYRILLIC SMALL LETTER EF
  613. 0x0445: 0x00e5, # CYRILLIC SMALL LETTER HA
  614. 0x0446: 0x00e6, # CYRILLIC SMALL LETTER TSE
  615. 0x0447: 0x00e7, # CYRILLIC SMALL LETTER CHE
  616. 0x0448: 0x00e8, # CYRILLIC SMALL LETTER SHA
  617. 0x0449: 0x00e9, # CYRILLIC SMALL LETTER SHCHA
  618. 0x044a: 0x00ea, # CYRILLIC SMALL LETTER HARD SIGN
  619. 0x044b: 0x00eb, # CYRILLIC SMALL LETTER YERU
  620. 0x044c: 0x00ec, # CYRILLIC SMALL LETTER SOFT SIGN
  621. 0x044d: 0x00ed, # CYRILLIC SMALL LETTER E
  622. 0x044e: 0x00ee, # CYRILLIC SMALL LETTER YU
  623. 0x044f: 0x00ef, # CYRILLIC SMALL LETTER YA
  624. 0x0451: 0x00f1, # CYRILLIC SMALL LETTER IO
  625. 0x0454: 0x00f3, # CYRILLIC SMALL LETTER UKRAINIAN IE
  626. 0x0457: 0x00f5, # CYRILLIC SMALL LETTER YI
  627. 0x045e: 0x00f7, # CYRILLIC SMALL LETTER SHORT U
  628. 0x2116: 0x00fc, # NUMERO SIGN
  629. 0x2219: 0x00f9, # BULLET OPERATOR
  630. 0x221a: 0x00fb, # SQUARE ROOT
  631. 0x2500: 0x00c4, # BOX DRAWINGS LIGHT HORIZONTAL
  632. 0x2502: 0x00b3, # BOX DRAWINGS LIGHT VERTICAL
  633. 0x250c: 0x00da, # BOX DRAWINGS LIGHT DOWN AND RIGHT
  634. 0x2510: 0x00bf, # BOX DRAWINGS LIGHT DOWN AND LEFT
  635. 0x2514: 0x00c0, # BOX DRAWINGS LIGHT UP AND RIGHT
  636. 0x2518: 0x00d9, # BOX DRAWINGS LIGHT UP AND LEFT
  637. 0x251c: 0x00c3, # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
  638. 0x2524: 0x00b4, # BOX DRAWINGS LIGHT VERTICAL AND LEFT
  639. 0x252c: 0x00c2, # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
  640. 0x2534: 0x00c1, # BOX DRAWINGS LIGHT UP AND HORIZONTAL
  641. 0x253c: 0x00c5, # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
  642. 0x2550: 0x00cd, # BOX DRAWINGS DOUBLE HORIZONTAL
  643. 0x2551: 0x00ba, # BOX DRAWINGS DOUBLE VERTICAL
  644. 0x2552: 0x00d5, # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
  645. 0x2553: 0x00d6, # BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
  646. 0x2554: 0x00c9, # BOX DRAWINGS DOUBLE DOWN AND RIGHT
  647. 0x2555: 0x00b8, # BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
  648. 0x2556: 0x00b7, # BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
  649. 0x2557: 0x00bb, # BOX DRAWINGS DOUBLE DOWN AND LEFT
  650. 0x2558: 0x00d4, # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
  651. 0x2559: 0x00d3, # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
  652. 0x255a: 0x00c8, # BOX DRAWINGS DOUBLE UP AND RIGHT
  653. 0x255b: 0x00be, # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
  654. 0x255c: 0x00bd, # BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
  655. 0x255d: 0x00bc, # BOX DRAWINGS DOUBLE UP AND LEFT
  656. 0x255e: 0x00c6, # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
  657. 0x255f: 0x00c7, # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
  658. 0x2560: 0x00cc, # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
  659. 0x2561: 0x00b5, # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
  660. 0x2562: 0x00b6, # BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
  661. 0x2563: 0x00b9, # BOX DRAWINGS DOUBLE VERTICAL AND LEFT
  662. 0x2564: 0x00d1, # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
  663. 0x2565: 0x00d2, # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
  664. 0x2566: 0x00cb, # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
  665. 0x2567: 0x00cf, # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
  666. 0x2568: 0x00d0, # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
  667. 0x2569: 0x00ca, # BOX DRAWINGS DOUBLE UP AND HORIZONTAL
  668. 0x256a: 0x00d8, # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
  669. 0x256b: 0x00d7, # BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
  670. 0x256c: 0x00ce, # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
  671. 0x2580: 0x00df, # UPPER HALF BLOCK
  672. 0x2584: 0x00dc, # LOWER HALF BLOCK
  673. 0x2588: 0x00db, # FULL BLOCK
  674. 0x258c: 0x00dd, # LEFT HALF BLOCK
  675. 0x2590: 0x00de, # RIGHT HALF BLOCK
  676. 0x2591: 0x00b0, # LIGHT SHADE
  677. 0x2592: 0x00b1, # MEDIUM SHADE
  678. 0x2593: 0x00b2, # DARK SHADE
  679. 0x25a0: 0x00fe, # BLACK SQUARE
  680. }