Bug #52910 [NEW]: PHP iconv() behaves differently than "iconv" command

From: Date: Wed, 22 Sep 2010 22:37:14 +0000
Subject: Bug #52910 [NEW]: PHP iconv() behaves differently than "iconv" command
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-154577@lists.php.net to get a copy of this message
From: Operating system: Debian unstable PHP version: 5.3SVN-2010-09-22 (snap) Package: ICONV related Bug Type: Bug Bug description:PHP iconv() behaves differently than "iconv" command Description: ------------ I confirmed that both PHP and the "iconv" command use glibc In the POSIX ("C") locale, "iconv" successfully transliterates "e" with an accent ("\xc3\xa9") to "e" with no accent, $ LC_ALL=C echo -e "\xc3\xa9" | iconv -f utf-8 -t ascii//TRANSLIT e $ - however in the same locale, PHP iconv() fails to transliterate "e" with an accent, $ LC_ALL=C sapi/cli/php -r 'var_dump(iconv("utf-8", "ascii//TRANSLIT", "\xc3\xa9"));' string(1) "?" $ -- Edit bug report at http://bugs.php.net/bug.php?id=52910&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52910&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52910&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52910&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52910&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52910&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52910&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52910&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52910&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52910&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52910&r=support Expected behavior: http://bugs.php.net/fix.php?id=52910&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52910&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52910&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52910&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52910&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52910&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52910&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52910&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52910&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52910&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52910&r=mysqlcfg

« previous php.bugs (#154577) next »