From: php at sebastianmendel dot de Operating system: GNU/Linux PHP version: 5.4.4 Package: Unicode Engine related Bug Type: Bug Bug description:UTF-8 chars fail to be printed out properly with zend.multibyte
Description: ------------ Enabling zend.multibyte and having declare(encoding = UTF-8) in UTF-8 encoded scripts does not print UTF-8 chars properly. Same script (still encoded as UTF-8) but with declare(encoding = ISO-8859-1) prints out UTF-8 chars correct. >/opt/phpfarm/inst/bin/php-5.4.4 -i | grep multi zend.multibyte => On => On >/opt/phpfarm/inst/bin/php-5.4.4 -i | grep UTF default_charset => UTF-8 => UTF-8 zend.script_encoding => UTF-8 => UTF-8 exif.encode_unicode => UTF-8 => UTF-8 iconv.input_encoding => UTF-8 => UTF-8 iconv.internal_encoding => UTF-8 => UTF-8 iconv.output_encoding => UTF-8 => UTF-8 LANG => de_DE.UTF-8 _SERVER["LANG"] => de_DE.UTF-8 Test script: --------------- <?php declare(encoding = 'UTF-8'); echo htmlspecialchars('"aäaÃ', ENT_QUOTES | ENT_IGNORE, 'UTF-8'); echo "\n" . '"aäaÃ'; ?> Expected result: ---------------- "aäaà "aäaà Actual result: -------------- "aa "aâaâ -- Edit bug report at https://bugs.php.net/bug.php?id=62351&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62351&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62351&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62351&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62351&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62351&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62351&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62351&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62351&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62351&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62351&r=support Expected behavior: https://bugs.php.net/fix.php?id=62351&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62351&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62351&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62351&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62351&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62351&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62351&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62351&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62351&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62351&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62351&r=mysqlcfg