xlpage-utf-8.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <?php if (!defined('PmWiki')) exit();
  2. /* Copyright 2004-2006 Patrick R. Michaud (pmichaud@pobox.com)
  3. This file is part of PmWiki; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published
  5. by the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version. See pmwiki.php for full details.
  7. This script configures PmWiki to use utf-8 in page content and
  8. pagenames. There are some unfortunate side effects about PHP's
  9. utf-8 implementation, however. First, since PHP doesn't have a
  10. way to do pattern matching on upper/lowercase UTF-8 characters,
  11. WikiWords are limited to the ASCII-7 set, and all links to page
  12. names with UTF-8 characters have to be in double brackets.
  13. Second, we have to assume that all non-ASCII characters are valid
  14. in pagenames, since there's no way to determine which UTF-8
  15. characters are "letters" and which are punctuation.
  16. */
  17. global $HTTPHeaders, $KeepToken, $pagename,
  18. $GroupPattern, $NamePattern, $WikiWordPattern, $SuffixPattern,
  19. $PageNameChars, $MakePageNamePatterns, $CaseConversions, $Charset;
  20. $Charset = 'UTF-8';
  21. $HTTPHeaders[] = 'Content-type: text/html; charset=UTF-8';
  22. $pagename = $_REQUEST['n'];
  23. if (!$pagename) $pagename = $_REQUEST['pagename'];
  24. if (!$pagename &&
  25. preg_match('!^'.preg_quote($_SERVER['SCRIPT_NAME'],'!').'/?([^?]*)!',
  26. $_SERVER['REQUEST_URI'],$match))
  27. $pagename = urldecode($match[1]);
  28. $pagename = preg_replace('!/+$!','',$pagename);
  29. $GroupPattern = '[\\w\\x80-\\xfe]+(?:-[[\\w\\x80-\\xfe]+)*';
  30. $NamePattern = '[\\w\\x80-\\xfe]+(?:-[[\\w\\x80-\\xfe]+)*';
  31. $WikiWordPattern =
  32. '[A-Z][A-Za-z0-9]*(?:[A-Z][a-z0-9]|[a-z0-9][A-Z])[A-Za-z0-9]*';
  33. $SuffixPattern = '(?:-?[[:alnum:]\\x80-\\xd6]+)*';
  34. SDV($PageNameChars, '-[:alnum:]\\x80-\\xfe');
  35. SDV($MakePageNamePatterns, array(
  36. "/'/" => '', # strip single-quotes
  37. "/[^$PageNameChars]+/" => ' ', # convert everything else to space
  38. "/(?<=^| )([a-z])/e" => "strtoupper('$1')",
  39. "/(?<=^| )([\\xc0-\\xdf].)/e" => "utf8toupper('$1')",
  40. "/ /" => ''));
  41. function utf8toupper($x) {
  42. global $CaseConversions;
  43. static $lower, $upper;
  44. if (function_exists('mb_strtoupper')) return mb_strtoupper($x, 'UTF-8');
  45. if (!@$lower) {
  46. $lower = array_keys($CaseConversions);
  47. $upper = array_values($CaseConversions);
  48. }
  49. return str_replace($lower, $upper, $x);
  50. }
  51. SDV($CaseConversions, array(
  52. 'a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D', 'e' => 'E', 'f' => 'F',
  53. 'g' => 'G', 'h' => 'H', 'i' => 'I', 'j' => 'J', 'k' => 'K', 'l' => 'L',
  54. 'm' => 'M', 'n' => 'N', 'o' => 'O', 'p' => 'P', 'q' => 'Q', 'r' => 'R',
  55. 's' => 'S', 't' => 'T', 'u' => 'U', 'v' => 'V', 'w' => 'W', 'x' => 'X',
  56. 'y' => 'Y', 'z' => 'Z',
  57. "\xc3\xa0" => "\xc3\x80", "\xc3\xa1" => "\xc3\x81",
  58. "\xc3\xa2" => "\xc3\x82", "\xc3\xa3" => "\xc3\x83",
  59. "\xc3\xa4" => "\xc3\x84", "\xc3\xa5" => "\xc3\x85",
  60. "\xc3\xa6" => "\xc3\x86", "\xc3\xa7" => "\xc3\x87",
  61. "\xc3\xa8" => "\xc3\x88", "\xc3\xa9" => "\xc3\x89",
  62. "\xc3\xaa" => "\xc3\x8a", "\xc3\xab" => "\xc3\x8b",
  63. "\xc3\xac" => "\xc3\x8c", "\xc3\xad" => "\xc3\x8d",
  64. "\xc3\xae" => "\xc3\x8e", "\xc3\xaf" => "\xc3\x8f",
  65. "\xc3\xb0" => "\xc3\x90", "\xc3\xb1" => "\xc3\x91",
  66. "\xc3\xb2" => "\xc3\x92", "\xc3\xb3" => "\xc3\x93",
  67. "\xc3\xb4" => "\xc3\x94", "\xc3\xb5" => "\xc3\x95",
  68. "\xc3\xb6" => "\xc3\x96", "\xc3\xb8" => "\xc3\x98",
  69. "\xc3\xb9" => "\xc3\x99", "\xc3\xba" => "\xc3\x9a",
  70. "\xc3\xbb" => "\xc3\x9b", "\xc3\xbc" => "\xc3\x9c",
  71. "\xc3\xbd" => "\xc3\x9d", "\xc3\xbe" => "\xc3\x9e",
  72. "\xc3\xbf" => "\xc5\xb8", "\xc4\x81" => "\xc4\x80",
  73. "\xc4\x83" => "\xc4\x82", "\xc4\x85" => "\xc4\x84",
  74. "\xc4\x87" => "\xc4\x86", "\xc4\x89" => "\xc4\x88",
  75. "\xc4\x8b" => "\xc4\x8a", "\xc4\x8d" => "\xc4\x8c",
  76. "\xc4\x8f" => "\xc4\x8e", "\xc4\x91" => "\xc4\x90",
  77. "\xc4\x93" => "\xc4\x92", "\xc4\x95" => "\xc4\x94",
  78. "\xc4\x97" => "\xc4\x96", "\xc4\x99" => "\xc4\x98",
  79. "\xc4\x9b" => "\xc4\x9a", "\xc4\x9d" => "\xc4\x9c",
  80. "\xc4\x9f" => "\xc4\x9e", "\xc4\xa1" => "\xc4\xa0",
  81. "\xc4\xa3" => "\xc4\xa2", "\xc4\xa5" => "\xc4\xa4",
  82. "\xc4\xa7" => "\xc4\xa6", "\xc4\xa9" => "\xc4\xa8",
  83. "\xc4\xab" => "\xc4\xaa", "\xc4\xad" => "\xc4\xac",
  84. "\xc4\xaf" => "\xc4\xae", "\xc4\xb1" => "\x49\x00",
  85. "\xc4\xb3" => "\xc4\xb2", "\xc4\xb5" => "\xc4\xb4",
  86. "\xc4\xb7" => "\xc4\xb6", "\xc4\xba" => "\xc4\xb9",
  87. "\xc4\xbc" => "\xc4\xbb", "\xc4\xbe" => "\xc4\xbd",
  88. "\xc5\x80" => "\xc4\xbf", "\xc5\x82" => "\xc5\x81",
  89. "\xc5\x84" => "\xc5\x83", "\xc5\x86" => "\xc5\x85",
  90. "\xc5\x88" => "\xc5\x87", "\xc5\x8b" => "\xc5\x8a",
  91. "\xc5\x8d" => "\xc5\x8c", "\xc5\x8f" => "\xc5\x8e",
  92. "\xc5\x91" => "\xc5\x90", "\xc5\x93" => "\xc5\x92",
  93. "\xc5\x95" => "\xc5\x94", "\xc5\x97" => "\xc5\x96",
  94. "\xc5\x99" => "\xc5\x98", "\xc5\x9b" => "\xc5\x9a",
  95. "\xc5\x9d" => "\xc5\x9c", "\xc5\x9f" => "\xc5\x9e",
  96. "\xc5\xa1" => "\xc5\xa0", "\xc5\xa3" => "\xc5\xa2",
  97. "\xc5\xa5" => "\xc5\xa4", "\xc5\xa7" => "\xc5\xa6",
  98. "\xc5\xa9" => "\xc5\xa8", "\xc5\xab" => "\xc5\xaa",
  99. "\xc5\xad" => "\xc5\xac", "\xc5\xaf" => "\xc5\xae",
  100. "\xc5\xb1" => "\xc5\xb0", "\xc5\xb3" => "\xc5\xb2",
  101. "\xc5\xb5" => "\xc5\xb4", "\xc5\xb7" => "\xc5\xb6",
  102. "\xc5\xba" => "\xc5\xb9", "\xc5\xbc" => "\xc5\xbb",
  103. "\xc5\xbe" => "\xc5\xbd", "\xc5\xbf" => "\x53\x00",
  104. "\xc6\x83" => "\xc6\x82", "\xc6\x85" => "\xc6\x84",
  105. "\xc6\x88" => "\xc6\x87", "\xc6\x8c" => "\xc6\x8b",
  106. "\xc6\x92" => "\xc6\x91", "\xc6\x95" => "\xc7\xb6",
  107. "\xc6\x99" => "\xc6\x98", "\xc6\x9e" => "\xc8\xa0",
  108. "\xc6\xa1" => "\xc6\xa0", "\xc6\xa3" => "\xc6\xa2",
  109. "\xc6\xa5" => "\xc6\xa4", "\xc6\xa8" => "\xc6\xa7",
  110. "\xc6\xad" => "\xc6\xac", "\xc6\xb0" => "\xc6\xaf",
  111. "\xc6\xb4" => "\xc6\xb3", "\xc6\xb6" => "\xc6\xb5",
  112. "\xc6\xb9" => "\xc6\xb8", "\xc6\xbd" => "\xc6\xbc",
  113. "\xc6\xbf" => "\xc7\xb7", "\xc7\x86" => "\xc7\x85",
  114. "\xc7\x89" => "\xc7\x88", "\xc7\x8c" => "\xc7\x8b",
  115. "\xc7\x8e" => "\xc7\x8d", "\xc7\x90" => "\xc7\x8f",
  116. "\xc7\x92" => "\xc7\x91", "\xc7\x94" => "\xc7\x93",
  117. "\xc7\x96" => "\xc7\x95", "\xc7\x98" => "\xc7\x97",
  118. "\xc7\x9a" => "\xc7\x99", "\xc7\x9c" => "\xc7\x9b",
  119. "\xc7\x9d" => "\xc6\x8e", "\xc7\x9f" => "\xc7\x9e",
  120. "\xc7\xa1" => "\xc7\xa0", "\xc7\xa3" => "\xc7\xa2",
  121. "\xc7\xa5" => "\xc7\xa4", "\xc7\xa7" => "\xc7\xa6",
  122. "\xc7\xa9" => "\xc7\xa8", "\xc7\xab" => "\xc7\xaa",
  123. "\xc7\xad" => "\xc7\xac", "\xc7\xaf" => "\xc7\xae",
  124. "\xc7\xb3" => "\xc7\xb2", "\xc7\xb5" => "\xc7\xb4",
  125. "\xc7\xb9" => "\xc7\xb8", "\xc7\xbb" => "\xc7\xba",
  126. "\xc7\xbd" => "\xc7\xbc", "\xc7\xbf" => "\xc7\xbe",
  127. "\xc8\x81" => "\xc8\x80", "\xc8\x83" => "\xc8\x82",
  128. "\xc8\x85" => "\xc8\x84", "\xc8\x87" => "\xc8\x86",
  129. "\xc8\x89" => "\xc8\x88", "\xc8\x8b" => "\xc8\x8a",
  130. "\xc8\x8d" => "\xc8\x8c", "\xc8\x8f" => "\xc8\x8e",
  131. "\xc8\x91" => "\xc8\x90", "\xc8\x93" => "\xc8\x92",
  132. "\xc8\x95" => "\xc8\x94", "\xc8\x97" => "\xc8\x96",
  133. "\xc8\x99" => "\xc8\x98", "\xc8\x9b" => "\xc8\x9a",
  134. "\xc8\x9d" => "\xc8\x9c", "\xc8\x9f" => "\xc8\x9e",
  135. "\xc8\xa3" => "\xc8\xa2", "\xc8\xa5" => "\xc8\xa4",
  136. "\xc8\xa7" => "\xc8\xa6", "\xc8\xa9" => "\xc8\xa8",
  137. "\xc8\xab" => "\xc8\xaa", "\xc8\xad" => "\xc8\xac",
  138. "\xc8\xaf" => "\xc8\xae", "\xc8\xb1" => "\xc8\xb0",
  139. "\xc8\xb3" => "\xc8\xb2", "\xc9\x93" => "\xc6\x81",
  140. "\xc9\x94" => "\xc6\x86", "\xc9\x96" => "\xc6\x89",
  141. "\xc9\x97" => "\xc6\x8a", "\xc9\x99" => "\xc6\x8f",
  142. "\xc9\x9b" => "\xc6\x90", "\xc9\xa0" => "\xc6\x93",
  143. "\xc9\xa3" => "\xc6\x94", "\xc9\xa8" => "\xc6\x97",
  144. "\xc9\xa9" => "\xc6\x96", "\xc9\xaf" => "\xc6\x9c",
  145. "\xc9\xb2" => "\xc6\x9d", "\xc9\xb5" => "\xc6\x9f",
  146. "\xca\x80" => "\xc6\xa6", "\xca\x83" => "\xc6\xa9",
  147. "\xca\x88" => "\xc6\xae", "\xca\x8a" => "\xc6\xb1",
  148. "\xca\x8b" => "\xc6\xb2", "\xca\x92" => "\xc6\xb7",
  149. "\xce\xac" => "\xce\x86", "\xce\xad" => "\xce\x88",
  150. "\xce\xae" => "\xce\x89", "\xce\xaf" => "\xce\x8a",
  151. "\xce\xb1" => "\xce\x91", "\xce\xb2" => "\xce\x92",
  152. "\xce\xb3" => "\xce\x93", "\xce\xb4" => "\xce\x94",
  153. "\xce\xb5" => "\xce\x95", "\xce\xb6" => "\xce\x96",
  154. "\xce\xb7" => "\xce\x97", "\xce\xb8" => "\xce\x98",
  155. "\xce\xb9" => "\xce\x99", "\xce\xba" => "\xce\x9a",
  156. "\xce\xbb" => "\xce\x9b", "\xce\xbc" => "\xce\x9c",
  157. "\xce\xbd" => "\xce\x9d", "\xce\xbe" => "\xce\x9e",
  158. "\xce\xbf" => "\xce\x9f", "\xcf\x80" => "\xce\xa0",
  159. "\xcf\x81" => "\xce\xa1", "\xcf\x82" => "\xce\xa3",
  160. "\xcf\x83" => "\xce\xa3", "\xcf\x84" => "\xce\xa4",
  161. "\xcf\x85" => "\xce\xa5", "\xcf\x86" => "\xce\xa6",
  162. "\xcf\x87" => "\xce\xa7", "\xcf\x88" => "\xce\xa8",
  163. "\xcf\x89" => "\xce\xa9", "\xcf\x8a" => "\xce\xaa",
  164. "\xcf\x8b" => "\xce\xab", "\xcf\x8c" => "\xce\x8c",
  165. "\xcf\x8d" => "\xce\x8e", "\xcf\x8e" => "\xce\x8f",
  166. "\xcf\x90" => "\xce\x92", "\xcf\x91" => "\xce\x98",
  167. "\xcf\x95" => "\xce\xa6", "\xcf\x96" => "\xce\xa0",
  168. "\xcf\x99" => "\xcf\x98", "\xcf\x9b" => "\xcf\x9a",
  169. "\xcf\x9d" => "\xcf\x9c", "\xcf\x9f" => "\xcf\x9e",
  170. "\xcf\xa1" => "\xcf\xa0", "\xcf\xa3" => "\xcf\xa2",
  171. "\xcf\xa5" => "\xcf\xa4", "\xcf\xa7" => "\xcf\xa6",
  172. "\xcf\xa9" => "\xcf\xa8", "\xcf\xab" => "\xcf\xaa",
  173. "\xcf\xad" => "\xcf\xac", "\xcf\xaf" => "\xcf\xae",
  174. "\xcf\xb0" => "\xce\x9a", "\xcf\xb1" => "\xce\xa1",
  175. "\xcf\xb2" => "\xce\xa3", "\xcf\xb5" => "\xce\x95",
  176. "\xd0\xb0" => "\xd0\x90", "\xd0\xb1" => "\xd0\x91",
  177. "\xd0\xb2" => "\xd0\x92", "\xd0\xb3" => "\xd0\x93",
  178. "\xd0\xb4" => "\xd0\x94", "\xd0\xb5" => "\xd0\x95",
  179. "\xd0\xb6" => "\xd0\x96", "\xd0\xb7" => "\xd0\x97",
  180. "\xd0\xb8" => "\xd0\x98", "\xd0\xb9" => "\xd0\x99",
  181. "\xd0\xba" => "\xd0\x9a", "\xd0\xbb" => "\xd0\x9b",
  182. "\xd0\xbc" => "\xd0\x9c", "\xd0\xbd" => "\xd0\x9d",
  183. "\xd0\xbe" => "\xd0\x9e", "\xd0\xbf" => "\xd0\x9f",
  184. "\xd1\x80" => "\xd0\xa0", "\xd1\x81" => "\xd0\xa1",
  185. "\xd1\x82" => "\xd0\xa2", "\xd1\x83" => "\xd0\xa3",
  186. "\xd1\x84" => "\xd0\xa4", "\xd1\x85" => "\xd0\xa5",
  187. "\xd1\x86" => "\xd0\xa6", "\xd1\x87" => "\xd0\xa7",
  188. "\xd1\x88" => "\xd0\xa8", "\xd1\x89" => "\xd0\xa9",
  189. "\xd1\x8a" => "\xd0\xaa", "\xd1\x8b" => "\xd0\xab",
  190. "\xd1\x8c" => "\xd0\xac", "\xd1\x8d" => "\xd0\xad",
  191. "\xd1\x8e" => "\xd0\xae", "\xd1\x8f" => "\xd0\xaf",
  192. "\xd1\x90" => "\xd0\x80", "\xd1\x91" => "\xd0\x81",
  193. "\xd1\x92" => "\xd0\x82", "\xd1\x93" => "\xd0\x83",
  194. "\xd1\x94" => "\xd0\x84", "\xd1\x95" => "\xd0\x85",
  195. "\xd1\x96" => "\xd0\x86", "\xd1\x97" => "\xd0\x87",
  196. "\xd1\x98" => "\xd0\x88", "\xd1\x99" => "\xd0\x89",
  197. "\xd1\x9a" => "\xd0\x8a", "\xd1\x9b" => "\xd0\x8b",
  198. "\xd1\x9c" => "\xd0\x8c", "\xd1\x9d" => "\xd0\x8d",
  199. "\xd1\x9e" => "\xd0\x8e", "\xd1\x9f" => "\xd0\x8f",
  200. "\xd1\xa1" => "\xd1\xa0", "\xd1\xa3" => "\xd1\xa2",
  201. "\xd1\xa5" => "\xd1\xa4", "\xd1\xa7" => "\xd1\xa6",
  202. "\xd1\xa9" => "\xd1\xa8", "\xd1\xab" => "\xd1\xaa",
  203. "\xd1\xad" => "\xd1\xac", "\xd1\xaf" => "\xd1\xae",
  204. "\xd1\xb1" => "\xd1\xb0", "\xd1\xb3" => "\xd1\xb2",
  205. "\xd1\xb5" => "\xd1\xb4", "\xd1\xb7" => "\xd1\xb6",
  206. "\xd1\xb9" => "\xd1\xb8", "\xd1\xbb" => "\xd1\xba",
  207. "\xd1\xbd" => "\xd1\xbc", "\xd1\xbf" => "\xd1\xbe",
  208. "\xd2\x81" => "\xd2\x80", "\xd2\x8b" => "\xd2\x8a",
  209. "\xd2\x8d" => "\xd2\x8c", "\xd2\x8f" => "\xd2\x8e",
  210. "\xd2\x91" => "\xd2\x90", "\xd2\x93" => "\xd2\x92",
  211. "\xd2\x95" => "\xd2\x94", "\xd2\x97" => "\xd2\x96",
  212. "\xd2\x99" => "\xd2\x98", "\xd2\x9b" => "\xd2\x9a",
  213. "\xd2\x9d" => "\xd2\x9c", "\xd2\x9f" => "\xd2\x9e",
  214. "\xd2\xa1" => "\xd2\xa0", "\xd2\xa3" => "\xd2\xa2",
  215. "\xd2\xa5" => "\xd2\xa4", "\xd2\xa7" => "\xd2\xa6",
  216. "\xd2\xa9" => "\xd2\xa8", "\xd2\xab" => "\xd2\xaa",
  217. "\xd2\xad" => "\xd2\xac", "\xd2\xaf" => "\xd2\xae",
  218. "\xd2\xb1" => "\xd2\xb0", "\xd2\xb3" => "\xd2\xb2",
  219. "\xd2\xb5" => "\xd2\xb4", "\xd2\xb7" => "\xd2\xb6",
  220. "\xd2\xb9" => "\xd2\xb8", "\xd2\xbb" => "\xd2\xba",
  221. "\xd2\xbd" => "\xd2\xbc", "\xd2\xbf" => "\xd2\xbe",
  222. "\xd3\x82" => "\xd3\x81", "\xd3\x84" => "\xd3\x83",
  223. "\xd3\x86" => "\xd3\x85", "\xd3\x88" => "\xd3\x87",
  224. "\xd3\x8a" => "\xd3\x89", "\xd3\x8c" => "\xd3\x8b",
  225. "\xd3\x8e" => "\xd3\x8d", "\xd3\x91" => "\xd3\x90",
  226. "\xd3\x93" => "\xd3\x92", "\xd3\x95" => "\xd3\x94",
  227. "\xd3\x97" => "\xd3\x96", "\xd3\x99" => "\xd3\x98",
  228. "\xd3\x9b" => "\xd3\x9a", "\xd3\x9d" => "\xd3\x9c",
  229. "\xd3\x9f" => "\xd3\x9e", "\xd3\xa1" => "\xd3\xa0",
  230. "\xd3\xa3" => "\xd3\xa2", "\xd3\xa5" => "\xd3\xa4",
  231. "\xd3\xa7" => "\xd3\xa6", "\xd3\xa9" => "\xd3\xa8",
  232. "\xd3\xab" => "\xd3\xaa", "\xd3\xad" => "\xd3\xac",
  233. "\xd3\xaf" => "\xd3\xae", "\xd3\xb1" => "\xd3\xb0",
  234. "\xd3\xb3" => "\xd3\xb2", "\xd3\xb5" => "\xd3\xb4",
  235. "\xd3\xb9" => "\xd3\xb8", "\xd4\x81" => "\xd4\x80",
  236. "\xd4\x83" => "\xd4\x82", "\xd4\x85" => "\xd4\x84",
  237. "\xd4\x87" => "\xd4\x86", "\xd4\x89" => "\xd4\x88",
  238. "\xd4\x8b" => "\xd4\x8a", "\xd4\x8d" => "\xd4\x8c",
  239. "\xd4\x8f" => "\xd4\x8e", "\xd5\xa1" => "\xd4\xb1",
  240. "\xd5\xa2" => "\xd4\xb2", "\xd5\xa3" => "\xd4\xb3",
  241. "\xd5\xa4" => "\xd4\xb4", "\xd5\xa5" => "\xd4\xb5",
  242. "\xd5\xa6" => "\xd4\xb6", "\xd5\xa7" => "\xd4\xb7",
  243. "\xd5\xa8" => "\xd4\xb8", "\xd5\xa9" => "\xd4\xb9",
  244. "\xd5\xaa" => "\xd4\xba", "\xd5\xab" => "\xd4\xbb",
  245. "\xd5\xac" => "\xd4\xbc", "\xd5\xad" => "\xd4\xbd",
  246. "\xd5\xae" => "\xd4\xbe", "\xd5\xaf" => "\xd4\xbf",
  247. "\xd5\xb0" => "\xd5\x80", "\xd5\xb1" => "\xd5\x81",
  248. "\xd5\xb2" => "\xd5\x82", "\xd5\xb3" => "\xd5\x83",
  249. "\xd5\xb4" => "\xd5\x84", "\xd5\xb5" => "\xd5\x85",
  250. "\xd5\xb6" => "\xd5\x86", "\xd5\xb7" => "\xd5\x87",
  251. "\xd5\xb8" => "\xd5\x88", "\xd5\xb9" => "\xd5\x89",
  252. "\xd5\xba" => "\xd5\x8a", "\xd5\xbb" => "\xd5\x8b",
  253. "\xd5\xbc" => "\xd5\x8c", "\xd5\xbd" => "\xd5\x8d",
  254. "\xd5\xbe" => "\xd5\x8e", "\xd5\xbf" => "\xd5\x8f",
  255. "\xd6\x80" => "\xd5\x90", "\xd6\x81" => "\xd5\x91",
  256. "\xd6\x82" => "\xd5\x92", "\xd6\x83" => "\xd5\x93",
  257. "\xd6\x84" => "\xd5\x94", "\xd6\x85" => "\xd5\x95",
  258. "\xd6\x86" => "\xd5\x96",
  259. ));