mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
c92ae847c7
fix existing ones
26 lines
435 B
PHP
26 lines
435 B
PHP
--TEST--
|
|
Bug #28220 (mb_strwidth() returns wrong width values for some Hangul characters)
|
|
--SKIPIF--
|
|
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
|
--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
|