PageRenderTime 59ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/application/third_party/ajax/JsHttpRequest.php

https://bitbucket.org/klunwebale/codeigniter-rest-for-frontaccounting-erp
PHP | 547 lines | 428 code | 20 blank | 99 comment | 13 complexity | 3369fa88a37e2adad07a79cfedf2f497 MD5 | raw file
  1. <?php
  2. /**
  3. * JsHttpRequest: PHP backend for JavaScript DHTML loader.
  4. * (C) Dmitry Koterov, http://en.dklab.ru
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. * See http://www.gnu.org/copyleft/lesser.html
  11. *
  12. * Do not remove this comment if you want to use the script!
  13. * �� �������� ������ �����������, ���� �� ������ ������������ ������!
  14. *
  15. * This backend library also supports POST requests additionally to GET.
  16. *
  17. * @author Dmitry Koterov
  18. * @version 5.x
  19. */
  20. class JsHttpRequest
  21. {
  22. public $SCRIPT_ENCODING = "windows-1251";
  23. public $SCRIPT_DECODE_MODE = '';
  24. public $LOADER = null;
  25. public $ID = null;
  26. public $RESULT = null;
  27. // Internal; uniq value.
  28. public $_uniqHash;
  29. // Magic number for display_error checking.
  30. public $_magic = 14623;
  31. // Previous display_errors value.
  32. public $_prevDisplayErrors = null;
  33. // Internal: response content-type depending on loader type.
  34. public $_contentTypes = array(
  35. "script" => "text/javascript",
  36. "xml" => "text/plain", // In XMLHttpRequest mode we must return text/plain - stupid Opera 8.0. :(
  37. "form" => "text/html",
  38. "" => "text/plain", // for unknown loader
  39. );
  40. // Internal: conversion to UTF-8 JSON cancelled because of non-ascii key.
  41. public $_toUtfFailed = false;
  42. // Internal: list of characters 128...255 (for strpbrk() ASCII check).
  43. public $_nonAsciiChars = '';
  44. // Which Unicode conversion function is available?
  45. public $_unicodeConvMethod = null;
  46. // Emergency memory buffer to be freed on memory_limit error.
  47. public $_emergBuffer = null;
  48. /**
  49. * Constructor.
  50. *
  51. * Create new JsHttpRequest backend object and attach it
  52. * to script output buffer. As a result - script will always return
  53. * correct JavaScript code, even in case of fatal errors.
  54. *
  55. * QUERY_STRING is in form of: PHPSESSID=<sid>&a=aaa&b=bbb&JsHttpRequest=<id>-<loader>
  56. * where <id> is a request ID, <loader> is a loader name, <sid> - a session ID (if present),
  57. * PHPSESSID - session parameter name (by default = "PHPSESSID").
  58. *
  59. * If an object is created WITHOUT an active AJAX query, it is simply marked as
  60. * non-active. Use statuc method isActive() to check.
  61. */
  62. function JsHttpRequest($enc)
  63. {
  64. global $JsHttpRequest_Active;
  65. // To be on a safe side - do not allow to drop reference counter on ob processing.
  66. $GLOBALS['_RESULT'] =& $this->RESULT;
  67. // Parse QUERY_STRING.
  68. if (preg_match('/^(.*)(?:&|^)JsHttpRequest=(?:(\d+)-)?([^&]+)((?:&|$).*)$/s', @$_SERVER['QUERY_STRING'], $m)) {
  69. $this->ID = $m[2];
  70. $this->LOADER = strtolower($m[3]);
  71. $_SERVER['QUERY_STRING'] = preg_replace('/^&+|&+$/s', '', preg_replace('/(^|&)'.session_name().'=[^&]*&?/s', '&', $m[1] . $m[4]));
  72. unset(
  73. $_GET['JsHttpRequest'],
  74. $_REQUEST['JsHttpRequest'],
  75. $_GET[session_name()],
  76. $_POST[session_name()],
  77. $_REQUEST[session_name()]
  78. );
  79. // Detect Unicode conversion method.
  80. $this->_unicodeConvMethod = function_exists('mb_convert_encoding')? 'mb' : (function_exists('iconv')? 'iconv' : null);
  81. // Fill an emergency buffer. We erase it at the first line of OB processor
  82. // to free some memory. This memory may be used on memory_limit error.
  83. $this->_emergBuffer = str_repeat('a', 1024 * 200);
  84. // Intercept fatal errors via display_errors (seems it is the only way).
  85. $this->_uniqHash = md5('JsHttpRequest' . microtime() . getmypid());
  86. $this->_prevDisplayErrors = ini_get('display_errors');
  87. ini_set('display_errors', $this->_magic); //
  88. ini_set('error_prepend_string', $this->_uniqHash . ini_get('error_prepend_string'));
  89. ini_set('error_append_string', ini_get('error_append_string') . $this->_uniqHash);
  90. if (function_exists('xdebug_disable')) xdebug_disable(); // else Fatal errors are not catched
  91. // Start OB handling early.
  92. ob_start(array(&$this, "_obHandler"));
  93. $JsHttpRequest_Active = true;
  94. // Set up the encoding.
  95. $this->setEncoding($enc);
  96. // Check if headers are already sent (see Content-Type library usage).
  97. // If true - generate a debug message and exit.
  98. $file = $line = null;
  99. $headersSent = version_compare(PHP_VERSION, "4.3.0") < 0? headers_sent() : headers_sent($file, $line);
  100. if ($headersSent) {
  101. trigger_error(
  102. "HTTP headers are already sent" . ($line !== null? " in $file on line $line" : " somewhere in the script") . ". "
  103. . "Possibly you have an extra space (or a newline) before the first line of the script or any library. "
  104. . "Please note that JsHttpRequest uses its own Content-Type header and fails if "
  105. . "this header cannot be set. See header() function documentation for more details",
  106. E_USER_ERROR
  107. );
  108. exit();
  109. }
  110. } else {
  111. $this->ID = 0;
  112. $this->LOADER = 'unknown';
  113. $JsHttpRequest_Active = false;
  114. }
  115. }
  116. /**
  117. * Static function.
  118. * Returns true if JsHttpRequest output processor is currently active.
  119. *
  120. * @return boolean True if the library is active, false otherwise.
  121. */
  122. function isActive()
  123. {
  124. return !empty($GLOBALS['JsHttpRequest_Active']);
  125. }
  126. /**
  127. * string getJsCode()
  128. *
  129. * Return JavaScript part of the library.
  130. */
  131. function getJsCode()
  132. {
  133. return file_get_contents(dirname(__FILE__) . '/JsHttpRequest.js');
  134. }
  135. /**
  136. * void setEncoding(string $encoding)
  137. *
  138. * Set an active script encoding & correct QUERY_STRING according to it.
  139. * Examples:
  140. * "windows-1251" - set plain encoding (non-windows characters,
  141. * e.g. hieroglyphs, are totally ignored)
  142. * "windows-1251 entities" - set windows encoding, BUT additionally replace:
  143. * "&" -> "&amp;"
  144. * hieroglyph -> &#XXXX; entity
  145. */
  146. function setEncoding($enc)
  147. {
  148. // Parse an encoding.
  149. preg_match('/^(\S*)(?:\s+(\S*))$/', $enc, $p);
  150. $this->SCRIPT_ENCODING = strtolower(!empty($p[1])? $p[1] : $enc);
  151. $this->SCRIPT_DECODE_MODE = !empty($p[2])? $p[2] : '';
  152. // Manually parse QUERY_STRING because of damned Unicode's %uXXXX.
  153. $this->_correctSuperglobals();
  154. }
  155. /**
  156. * string quoteInput(string $input)
  157. *
  158. * Quote a string according to the input decoding mode.
  159. * If entities are used (see setEncoding()), no '&' character is quoted,
  160. * only '"', '>' and '<' (we presume that '&' is already quoted by
  161. * an input reader function).
  162. *
  163. * Use this function INSTEAD of htmlspecialchars() for $_GET data
  164. * in your scripts.
  165. */
  166. function quoteInput($s)
  167. {
  168. if ($this->SCRIPT_DECODE_MODE == 'entities')
  169. return str_replace(array('"', '<', '>'), array('&quot;', '&lt;', '&gt;'), $s);
  170. else
  171. return htmlspecialchars($s);
  172. }
  173. /**
  174. * Convert a PHP scalar, array or hash to JS scalar/array/hash. This function is
  175. * an analog of json_encode(), but it can work with a non-UTF8 input and does not
  176. * analyze the passed data. Output format must be fully JSON compatible.
  177. *
  178. * @param mixed $a Any structure to convert to JS.
  179. * @return string JavaScript equivalent structure.
  180. */
  181. function php2js($a=false)
  182. {
  183. if (is_null($a)) return 'null';
  184. if ($a === false) return 'false';
  185. if ($a === true) return 'true';
  186. if (is_scalar($a)) {
  187. if (is_float($a)) {
  188. // Always use "." for floats.
  189. $a = str_replace(",", ".", strval($a));
  190. }
  191. // All scalars are converted to strings to avoid indeterminism.
  192. // PHP's "1" and 1 are equal for all PHP operators, but
  193. // JS's "1" and 1 are not. So if we pass "1" or 1 from the PHP backend,
  194. // we should get the same result in the JS frontend (string).
  195. // Character replacements for JSON.
  196. static $jsonReplaces = array(
  197. array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'),
  198. array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')
  199. );
  200. return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"';
  201. }
  202. $isList = true;
  203. for ($i = 0, reset($a); $i < count($a); $i++, next($a)) {
  204. if (key($a) !== $i) {
  205. $isList = false;
  206. break;
  207. }
  208. }
  209. $result = array();
  210. if ($isList) {
  211. foreach ($a as $v) {
  212. $result[] = $this->php2js($v);
  213. }
  214. return '[ ' . join(', ', $result) . ' ]';
  215. } else {
  216. foreach ($a as $k => $v) {
  217. $result[] = $this->php2js($k) . ': ' . $this->php2js($v);
  218. }
  219. return '{ ' . join(', ', $result) . ' }';
  220. }
  221. }
  222. /**
  223. * Internal methods.
  224. */
  225. /**
  226. * Parse & decode QUERY_STRING.
  227. */
  228. function _correctSuperglobals()
  229. {
  230. // In case of FORM loader we may go to nirvana, everything is already parsed by PHP.
  231. if ($this->LOADER == 'form') return;
  232. // ATTENTION!!!
  233. // HTTP_RAW_POST_DATA is only accessible when Content-Type of POST request
  234. // is NOT default "application/x-www-form-urlencoded"!!!
  235. // Library frontend sets "application/octet-stream" for that purpose,
  236. // see JavaScript code. In PHP 5.2.2.HTTP_RAW_POST_DATA is not set sometimes;
  237. // in such cases - read the POST data manually from the STDIN stream.
  238. $rawPost = strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') == 0? (isset($GLOBALS['HTTP_RAW_POST_DATA'])? $GLOBALS['HTTP_RAW_POST_DATA'] : @file_get_contents("php://input")) : null;
  239. $source = array(
  240. '_GET' => !empty($_SERVER['QUERY_STRING'])? $_SERVER['QUERY_STRING'] : null,
  241. '_POST'=> $rawPost,
  242. );
  243. foreach ($source as $dst=>$src) {
  244. // First correct all 2-byte entities.
  245. $s = preg_replace('/%(?!5B)(?!5D)([0-9a-f]{2})/si', '%u00\\1', $src);
  246. // Now we can use standard parse_str() with no worry!
  247. $data = null;
  248. parse_str($s, $data);
  249. $GLOBALS[$dst] = $this->_ucs2EntitiesDecode($data);
  250. }
  251. $GLOBALS['HTTP_GET_VARS'] = $_GET; // deprecated vars
  252. $GLOBALS['HTTP_POST_VARS'] = $_POST;
  253. $_REQUEST =
  254. (isset($_COOKIE)? $_COOKIE : array()) +
  255. (isset($_POST)? $_POST : array()) +
  256. (isset($_GET)? $_GET : array());
  257. if (ini_get('register_globals')) {
  258. // TODO?
  259. }
  260. }
  261. /**
  262. * Called in case of error too!
  263. */
  264. function _obHandler($text)
  265. {
  266. unset($this->_emergBuffer); // free a piece of memory for memory_limit error
  267. unset($GLOBALS['JsHttpRequest_Active']);
  268. // Check for error & fetch a resulting data.
  269. $wasFatalError = false;
  270. if (preg_match_all("/{$this->_uniqHash}(.*?){$this->_uniqHash}/sx", $text, $m)) {
  271. // Display_errors:
  272. // 1. disabled manually after the library initialization, or
  273. // 2. was initially disabled and is not changed
  274. $needRemoveErrorMessages = !ini_get('display_errors') || (!$this->_prevDisplayErrors && ini_get('display_errors') == $this->_magic);
  275. foreach ($m[0] as $error) {
  276. if (preg_match('/\bFatal error(<.*?>)?:/i', $error)) {
  277. $wasFatalError = true;
  278. }
  279. if ($needRemoveErrorMessages) {
  280. $text = str_replace($error, '', $text); // strip the whole error message
  281. } else {
  282. $text = str_replace($this->_uniqHash, '', $text);
  283. }
  284. }
  285. }
  286. if ($wasFatalError) {
  287. // On fatal errors - force "null" result. This is needed, because $_RESULT
  288. // may not be fully completed at the moment of the error.
  289. $this->RESULT = null;
  290. } else {
  291. // Read the result from globals if not set directly.
  292. if (!isset($this->RESULT)) {
  293. global $_RESULT;
  294. $this->RESULT = $_RESULT;
  295. }
  296. // Avoid manual NULLs in the result (very important!).
  297. if ($this->RESULT === null) {
  298. $this->RESULT = false;
  299. }
  300. }
  301. // Note that 500 error is generated when a PHP error occurred.
  302. $status = $this->RESULT === null? 500 : 200;
  303. $result = array(
  304. 'id' => $this->ID,
  305. 'js' => $this->RESULT, // null always means a fatal error...
  306. 'text' => $text, // ...independent on $text!!!
  307. );
  308. $encoding = $this->SCRIPT_ENCODING;
  309. $text = null; // to be on a safe side
  310. // Try to use very fast json_encode: 3-4 times faster than a manual encoding.
  311. if (function_exists('array_walk_recursive') && function_exists('json_encode') && $this->_unicodeConvMethod) {
  312. $this->_nonAsciiChars = join("", array_map('chr', range(128, 255)));
  313. $this->_toUtfFailed = false;
  314. $resultUtf8 = $result;
  315. array_walk_recursive($resultUtf8, array(&$this, '_toUtf8_callback'), $this->SCRIPT_ENCODING);
  316. if (!$this->_toUtfFailed) {
  317. // If some key contains non-ASCII character, convert everything manually.
  318. $text = json_encode($resultUtf8);
  319. $encoding = "UTF-8";
  320. }
  321. }
  322. // On failure, use manual encoding.
  323. if ($text === null) {
  324. $text = $this->php2js($result);
  325. }
  326. if ($this->LOADER != "xml") {
  327. // In non-XML mode we cannot use plain JSON. So - wrap with JS function call.
  328. // If top.JsHttpRequestGlobal is not defined, loading is aborted and
  329. // iframe is removed, so - do not call dataReady().
  330. $text = ""
  331. . ($this->LOADER == "form"? 'top && top.JsHttpRequestGlobal && top.JsHttpRequestGlobal' : 'JsHttpRequest')
  332. . ".dataReady(" . $text . ")\n"
  333. . "";
  334. if ($this->LOADER == "form") {
  335. $text = '<script type="text/javascript" language="JavaScript"><!--' . "\n$text" . '//--></script>';
  336. }
  337. // Always return 200 code in non-XML mode (else SCRIPT does not work in FF).
  338. // For XML mode, 500 code is okay.
  339. $status = 200;
  340. }
  341. // Status header. To be safe, display it only in error mode. In case of success
  342. // termination, do not modify the status (""HTTP/1.1 ..." header seems to be not
  343. // too cross-platform).
  344. if ($this->RESULT === null) {
  345. if (php_sapi_name() == "cgi") {
  346. header("Status: $status");
  347. } else {
  348. header("HTTP/1.1 $status");
  349. }
  350. }
  351. // In XMLHttpRequest mode we must return text/plain - damned stupid Opera 8.0. :(
  352. $ctype = !empty($this->_contentTypes[$this->LOADER])? $this->_contentTypes[$this->LOADER] : $this->_contentTypes[''];
  353. header("Content-type: $ctype; charset=$encoding");
  354. return $text;
  355. }
  356. /**
  357. * Internal function, used in array_walk_recursive() before json_encode() call.
  358. * If a key contains non-ASCII characters, this function sets $this->_toUtfFailed = true,
  359. * becaues array_walk_recursive() cannot modify array keys.
  360. */
  361. function _toUtf8_callback(&$v, $k, $fromEnc)
  362. {
  363. if ($v === null || is_bool($v)) return;
  364. if ($this->_toUtfFailed || !is_scalar($v) || strpbrk($k, $this->_nonAsciiChars) !== false) {
  365. $this->_toUtfFailed = true;
  366. } else {
  367. $v = $this->_unicodeConv($fromEnc, 'UTF-8', $v);
  368. }
  369. }
  370. /**
  371. * Decode all %uXXXX entities in string or array (recurrent).
  372. * String must not contain %XX entities - they are ignored!
  373. */
  374. function _ucs2EntitiesDecode($data)
  375. {
  376. if (is_array($data)) {
  377. $d = array();
  378. foreach ($data as $k=>$v) {
  379. $d[$this->_ucs2EntitiesDecode($k)] = $this->_ucs2EntitiesDecode($v);
  380. }
  381. return $d;
  382. } else {
  383. if (strpos($data, '%u') !== false) { // improve speed
  384. $data = preg_replace_callback('/%u([0-9A-F]{1,4})/si', array(&$this, '_ucs2EntitiesDecodeCallback'), $data);
  385. }
  386. return $data;
  387. }
  388. }
  389. /**
  390. * Decode one %uXXXX entity (RE callback).
  391. */
  392. function _ucs2EntitiesDecodeCallback($p)
  393. {
  394. $hex = $p[1];
  395. $dec = hexdec($hex);
  396. if ($dec === "38" && $this->SCRIPT_DECODE_MODE == 'entities') {
  397. // Process "&" separately in "entities" decode mode.
  398. $c = "&amp;";
  399. } else {
  400. if ($this->_unicodeConvMethod) {
  401. $c = @$this->_unicodeConv('UCS-2BE', $this->SCRIPT_ENCODING, pack('n', $dec));
  402. } else {
  403. $c = $this->_decUcs2Decode($dec, $this->SCRIPT_ENCODING);
  404. }
  405. if (!strlen($c)) {
  406. if ($this->SCRIPT_DECODE_MODE == 'entities') {
  407. $c = '&#' . $dec . ';';
  408. } else {
  409. $c = '?';
  410. }
  411. }
  412. }
  413. return $c;
  414. }
  415. /**
  416. * Wrapper for iconv() or mb_convert_encoding() functions.
  417. * This function will generate fatal error if none of these functons available!
  418. *
  419. * @see iconv()
  420. */
  421. function _unicodeConv($fromEnc, $toEnc, $v)
  422. {
  423. if ($this->_unicodeConvMethod == 'iconv') {
  424. return iconv($fromEnc, $toEnc, $v);
  425. }
  426. return mb_convert_encoding($v, $toEnc, $fromEnc);
  427. }
  428. /**
  429. * If there is no ICONV, try to decode 1-byte characters and UTF-8 manually
  430. * (for most popular charsets only).
  431. */
  432. /**
  433. * Convert from UCS-2BE decimal to $toEnc.
  434. */
  435. function _decUcs2Decode($code, $toEnc)
  436. {
  437. // Little speedup by using array_flip($this->_encTables) and later hash access.
  438. static $flippedTable = null;
  439. if ($code < 128) return chr($code);
  440. if (isset($this->_encTables[$toEnc])) {
  441. if (!$flippedTable) $flippedTable = array_flip($this->_encTables[$toEnc]);
  442. if (isset($flippedTable[$code])) return chr(128 + $flippedTable[$code]);
  443. } else if ($toEnc == 'utf-8' || $toEnc == 'utf8') {
  444. // UTF-8 conversion rules: http://www.cl.cam.ac.uk/~mgk25/unicode.html
  445. if ($code < 0x800) {
  446. return chr(0xC0 + ($code >> 6)) .
  447. chr(0x80 + ($code & 0x3F));
  448. } else { // if ($code <= 0xFFFF) -- it is almost always so for UCS2-BE
  449. return chr(0xE0 + ($code >> 12)) .
  450. chr(0x80 + (0x3F & ($code >> 6))) .
  451. chr(0x80 + ($code & 0x3F));
  452. }
  453. }
  454. return "";
  455. }
  456. /**
  457. * UCS-2BE -> 1-byte encodings (from #128).
  458. */
  459. var $_encTables = array(
  460. 'windows-1251' => array(
  461. 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
  462. 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
  463. 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
  464. 0x0098, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
  465. 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
  466. 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
  467. 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
  468. 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
  469. 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
  470. 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
  471. 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
  472. 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
  473. 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
  474. 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
  475. 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
  476. 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
  477. ),
  478. 'koi8-r' => array(
  479. 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
  480. 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
  481. 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
  482. 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
  483. 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
  484. 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255d, 0x255E,
  485. 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
  486. 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
  487. 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
  488. 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043d, 0x043E,
  489. 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
  490. 0x044C, 0x044B, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044A,
  491. 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
  492. 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041d, 0x041E,
  493. 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
  494. 0x042C, 0x042B, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042A
  495. ),
  496. );
  497. }