@@ 1391-1402 (lines=12) @@ | ||
1388 | $ascii .= sprintf('\u%04s', bin2hex($utf16)); |
|
1389 | break; |
|
1390 | ||
1391 | case (($ord_var_c & 0xFC) == 0xF8): |
|
1392 | // characters U-00200000 - U-03FFFFFF, mask 111110XX |
|
1393 | // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
1394 | $char = pack('C*', $ord_var_c, |
|
1395 | ord($var{$c + 1}), |
|
1396 | ord($var{$c + 2}), |
|
1397 | ord($var{$c + 3}), |
|
1398 | ord($var{$c + 4})); |
|
1399 | $c += 4; |
|
1400 | $utf16 = $this->json_utf82utf16($char); |
|
1401 | $ascii .= sprintf('\u%04s', bin2hex($utf16)); |
|
1402 | break; |
|
1403 | ||
1404 | case (($ord_var_c & 0xFE) == 0xFC): |
|
1405 | // characters U-04000000 - U-7FFFFFFF, mask 1111110X |
|
@@ 1404-1416 (lines=13) @@ | ||
1401 | $ascii .= sprintf('\u%04s', bin2hex($utf16)); |
|
1402 | break; |
|
1403 | ||
1404 | case (($ord_var_c & 0xFE) == 0xFC): |
|
1405 | // characters U-04000000 - U-7FFFFFFF, mask 1111110X |
|
1406 | // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
1407 | $char = pack('C*', $ord_var_c, |
|
1408 | ord($var{$c + 1}), |
|
1409 | ord($var{$c + 2}), |
|
1410 | ord($var{$c + 3}), |
|
1411 | ord($var{$c + 4}), |
|
1412 | ord($var{$c + 5})); |
|
1413 | $c += 5; |
|
1414 | $utf16 = $this->json_utf82utf16($char); |
|
1415 | $ascii .= sprintf('\u%04s', bin2hex($utf16)); |
|
1416 | break; |
|
1417 | } |
|
1418 | } |
|
1419 |