danielc                                  Fri, 06 Jan 2012 22:10:04 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=321841

Log:
Test for bug 60675.

Bug: https://bugs.php.net/60675 (Open) htmlentities(ENT_COMPAT, windows-1251) 
for ISO-8859-1 encoded scripts
      
Changed paths:
    A   php/php-src/trunk/ext/standard/tests/strings/bug60675.phpt

Added: php/php-src/trunk/ext/standard/tests/strings/bug60675.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/strings/bug60675.phpt                  
        (rev 0)
+++ php/php-src/trunk/ext/standard/tests/strings/bug60675.phpt  2012-01-06 
22:10:04 UTC (rev 321841)
@@ -0,0 +1,24 @@
+--TEST--
+Bug 60675: htmlentities(ENT_COMPAT, windows-1251) for ISO-8859-1 encoded 
scripts
+--CREDITS--
+Daniel Convissor <dani...@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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to