summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2011-11-18 08:50:29 +0000
committerXinchen Hui <laruence@php.net>2011-11-18 08:50:29 +0000
commit5008390304e616c59ff8151605b58d03d163ff62 (patch)
tree98867d7a5e7edec3de90f1028d6bd469bfa94f50 /ext/mbstring/tests
parent77d0643b68f9f9405131e583f549d15240bfa358 (diff)
downloadphp-git-5008390304e616c59ff8151605b58d03d163ff62.tar.gz
Fixed bug #60306 (Characters lost while converting from cp936 to utf8)
Diffstat (limited to 'ext/mbstring/tests')
-rw-r--r--ext/mbstring/tests/bug60306.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/mbstring/tests/bug60306.phpt b/ext/mbstring/tests/bug60306.phpt
new file mode 100644
index 0000000000..f7969e1952
--- /dev/null
+++ b/ext/mbstring/tests/bug60306.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #60306 (Characters lost while converting from cp936 to utf8)
+--SKIPIF--
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
+--FILE--
+<?php
+$s = "洪仁玕";
+var_dump($s === mb_convert_encoding(mb_convert_encoding($s, "cp936", "utf8"), "utf8", "cp936"));
+?>
+--EXPECT--
+bool(true)