xref: /PHP-7.3/ext/intl/tests/bug68447.phpt (revision df683fa3)
1--TEST--
2Bug #68447: grapheme_extract take an extra trailing character
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5--FILE--
6<?php
7$katsushikaku = "葛��飾区";
8echo grapheme_extract($katsushikaku, 1) . "\n";
9
10$haiyore = "這��いよれ";
11echo grapheme_extract($haiyore, 1, GRAPHEME_EXTR_COUNT) . "\n";
12echo grapheme_extract($haiyore, 2, GRAPHEME_EXTR_COUNT) . "\n";
13echo grapheme_extract($haiyore, 6, GRAPHEME_EXTR_MAXBYTES) . "\n";
14echo grapheme_extract($haiyore, 9, GRAPHEME_EXTR_MAXBYTES) . "\n";
15echo grapheme_extract($haiyore, 12, GRAPHEME_EXTR_MAXBYTES) . "\n";
16echo grapheme_extract($haiyore, 1, GRAPHEME_EXTR_MAXCHARS) . "\n";
17echo grapheme_extract($haiyore, 2, GRAPHEME_EXTR_MAXCHARS) . "\n";
18echo grapheme_extract($haiyore, 3, GRAPHEME_EXTR_MAXCHARS) . "\n";
19--EXPECT--
20葛��
21這��
22這��い
23
24這��
25這��い
26
27這��
28這��い
29