xref: /PHP-5.5/ext/mbstring/tests/bug28220.phpt (revision 59b9ca51)
1--TEST--
2Bug #28220 (mb_strwidth() returns wrong width values for some Hangul characters)
3--SKIPIF--
4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5--FILE--
6<?php
7$coderange = array(
8	range(0x0000, 0x1fff),
9	range(0xff60, 0xff9f)
10);
11
12
13foreach ($coderange as $r) {
14	$ng = 0;
15	foreach ($r as $c) {
16		if (mb_strwidth(pack('N1', $c), 'UCS-4BE') != 2) {
17			$ng++;
18		}
19	}
20	echo "$ng\n";
21}
22?>
23--EXPECT--
248085
2563
26