]> granicus.if.org Git - php/commitdiff
Test for bug 60675.
authorDaniel Convissor <danielc@php.net>
Fri, 6 Jan 2012 22:09:15 +0000 (22:09 +0000)
committerDaniel Convissor <danielc@php.net>
Fri, 6 Jan 2012 22:09:15 +0000 (22:09 +0000)
ext/standard/tests/strings/bug60675.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/strings/bug60675.phpt b/ext/standard/tests/strings/bug60675.phpt
new file mode 100644 (file)
index 0000000..5fc22fc
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+Bug 60675: htmlentities(ENT_COMPAT, windows-1251) for ISO-8859-1 encoded scripts
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+--XFAIL--
+Bug 60675 exists
+--FILE--
+<?php
+
+/*
+ * This script needs to be encoded in ISO-8859-1 for the test to work.
+ * Check the encoding with "file -bi"
+ * If the encoding is wrong, change it with:
+ *   mv bug60675.phpt bug60675.tmp
+ *   iconv -f <output of file -bi> -t ISO-8859-1 bug60675.tmp > bug60675.phpt
+ *   rm bug60675.tmp
+ */
+
+$in = 'Òåñòèðóåì';
+echo htmlentities($in, ENT_COMPAT, 'windows-1251');
+
+?>
+--EXPECT--
+&#1058;&#1077;&#1089;&#1090;&#1080;&#1088;&#1091;&#1077;&#1084;