Annotation of embedaddon/php/ext/mbstring/tests/bug28220.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #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:
! 13: foreach ($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--
! 24: 8101
! 25: 63
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>