From: mark at openmailadmin dot org Operating system: GNU/Linux PHP version: 5.1.2 PHP Bug Type: PCRE related Bug description: preg_quote harms strings encoded in UTF8
Description: ------------ If the given string has been encoded in UTF8, it will be returned in IS-8859-1 - but with the special chars destroyed. Reproduce code: --------------- $string = 'Fächerwahl'; // with German ä in UTF8 echo $string."\n"; echo preg_quote($string)."\n"; // the latter will have its umlaut destroyed. Expected result: ---------------- Two (binary) identic strings. Actual result: -------------- Actually they differ. -- Edit bug report at http://bugs.php.net/?id=36444&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36444&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36444&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36444&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36444&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36444&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36444&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36444&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36444&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36444&r=support Expected behavior: http://bugs.php.net/fix.php?id=36444&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36444&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36444&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36444&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36444&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36444&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36444&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36444&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36444&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36444&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36444&r=mysqlcfg