summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/bug62545.phpt
blob: 49ecc559d81c2eeb5d02ae99375185d665d3e3b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #62545 (wrong unicode mapping in some charsets)
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
?>
--FILE--
<?php
var_dump(
    bin2hex(mb_convert_encoding("\x98", 'UTF-8', 'Windows-1251')),
    bin2hex(mb_convert_encoding("\x81\x8d\x8f\x90\x9d", 'UTF-8', 'Windows-1252'))
);
?>
--EXPECT--
string(6) "efbfbd"
string(30) "efbfbdefbfbdefbfbdefbfbdefbfbd"