summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2018-03-11 18:05:08 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2018-03-11 18:05:08 +0100
commitef01ec08f080987c3614bd5658a87e985e28fa06 (patch)
tree0eb815236706e0a41d82f4b2cd5f238904244c43 /ext/mbstring/tests
parentd0ee2a8254c69546c7191ac26cdc0499eba27acf (diff)
parent2b02e6dff3750e58d8b3e6c5ede0ad3ccb68d353 (diff)
downloadphp-git-ef01ec08f080987c3614bd5658a87e985e28fa06.tar.gz
Merge branch 'PHP-7.2'
* PHP-7.2: Fix #62545: wrong unicode mapping in some charsets
Diffstat (limited to 'ext/mbstring/tests')
-rw-r--r--ext/mbstring/tests/bug62545.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/mbstring/tests/bug62545.phpt b/ext/mbstring/tests/bug62545.phpt
new file mode 100644
index 0000000000..6a68d0dee8
--- /dev/null
+++ b/ext/mbstring/tests/bug62545.phpt
@@ -0,0 +1,18 @@
+--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'))
+);
+?>
+===DONE===
+--EXPECT--
+string(6) "efbfbd"
+string(30) "efbfbdefbfbdefbfbdefbfbdefbfbd"
+===DONE===