mirror of
https://github.com/php/php-src.git
synced 2024-10-07 09:46:10 +00:00
24 lines
347 B
Plaintext
24 lines
347 B
Plaintext
|
--TEST--
|
||
|
Bug #28220 (mb_strwidth() returns wrong width values for some Hangul characters)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$coderange = array(
|
||
|
range(0x0000, 0x1fff),
|
||
|
range(0xff60, 0xff9f)
|
||
|
);
|
||
|
|
||
|
|
||
|
foreach ($coderange as $r) {
|
||
|
$ng = 0;
|
||
|
foreach ($r as $c) {
|
||
|
if (mb_strwidth(pack('N1', $c), 'UCS-4BE') != 2) {
|
||
|
$ng++;
|
||
|
}
|
||
|
}
|
||
|
echo "$ng\n";
|
||
|
}
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
8101
|
||
|
63
|