xref: /PHP-7.4/ext/mbstring/tests/bug69086.phpt (revision fb9bf5b6)
1--TEST--
2Request #69086 (enhancement for mb_convert_encoding)
3--SKIPIF--
4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5--FILE--
6<?php
7mb_substitute_character(0xfffd);
8var_dump("?" === mb_convert_encoding("\x80", "Shift_JIS", "EUC-JP"));
9mb_internal_encoding("UCS-4BE");
10var_dump("\x00\x00\xff\xfd" === mb_convert_encoding("\x80", "UCS-4BE", "UTF-8"));
11
12mb_internal_encoding("UTF-8");
13mb_substitute_character(0xfffd);
14var_dump("\u{fffd}" === mb_convert_encoding("\x80", "UTF-8", "EUC-JP-2004"));
15
16?>
17--EXPECT--
18bool(true)
19bool(true)
20bool(true)
21