xref: /php-src/ext/intl/tests/bug68447.phpt (revision 74859783)
1--TEST--
2Bug #68447: grapheme_extract take an extra trailing character
3--EXTENSIONS--
4intl
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?>
20--EXPECT--
21葛��
22這��
23這��い
24
25這��
26這��い
27
28這��
29這��い
30