xref: /php-src/ext/mbstring/tests/bug69267.phpt (revision 4083600b)
1--TEST--
2Bug #69267: mb_strtolower fails on titlecase characters
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7
8$str_l = "džljnjdz";
9$str_u = "DŽLJNJDZ";
10$str_t = "DžLjNjDz";
11var_dump(mb_strtolower($str_l));
12var_dump(mb_strtolower($str_u));
13var_dump(mb_strtolower($str_t));
14var_dump(mb_strtoupper($str_l));
15var_dump(mb_strtoupper($str_u));
16var_dump(mb_strtoupper($str_t));
17var_dump(mb_convert_case($str_l, MB_CASE_TITLE));
18var_dump(mb_convert_case($str_u, MB_CASE_TITLE));
19var_dump(mb_convert_case($str_t, MB_CASE_TITLE));
20
21$str_l = "ᾳ";
22$str_t = "ᾼ";
23var_dump(mb_strtolower($str_l));
24var_dump(mb_strtolower($str_t));
25var_dump(mb_strtoupper($str_l));
26var_dump(mb_strtoupper($str_t));
27var_dump(mb_convert_case($str_l, MB_CASE_TITLE));
28var_dump(mb_convert_case($str_t, MB_CASE_TITLE));
29
30?>
31--EXPECT--
32string(8) "džljnjdz"
33string(8) "džljnjdz"
34string(8) "džljnjdz"
35string(8) "DŽLJNJDZ"
36string(8) "DŽLJNJDZ"
37string(8) "DŽLJNJDZ"
38string(8) "Džljnjdz"
39string(8) "Džljnjdz"
40string(8) "Džljnjdz"
41string(3) "ᾳ"
42string(3) "ᾳ"
43string(4) "ΑΙ"
44string(4) "ΑΙ"
45string(3) "ᾼ"
46string(3) "ᾼ"
47