From: aboh24 at gmx dot de Operating system: Solaris 10 / 64-bit PHP version: 5.2.8 PHP Bug Type: ICONV related Bug description: PHP Notice: iconv(): Wrong charset
Description: ------------ The iconv-function is not working correct on my Solaris 10 / 64-bit. libiconv and php-5-2-8 (and others) were compiled with CFLAGS=-m64 and CXXFLAGS=-m64 to enable 64-bit binaries. ./configure --prefix=$PX \ --with-config-file-path=$PX/etc \ --with-apxs2=$PX/apache2/bin/apxs \ --with-iconv-dir=$PX \ --with-libxml-dir=$PX \ --with-zlib=$PX \ --with-zlib-dir=$PX \ --enable-mbstring \ --without-pear php.ini changes: extension=bitset.so Reproduce code: --------------- #!/home/si/suchopac/rt/bin/php -q <?php print_r ( iconv_get_encoding()); print_r(get_loaded_extensions ()); print_r(get_defined_constants(true)); printf(" %s \n",ICONV_IMPL); printf(" %s \n",ICONV_VERSION); echo iconv('UTF-8', 'ASCII//TRANSLIT', "test"); echo iconv('ASCII', 'UTF-8//TRANSLIT', "test"); echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', "test"); echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', "test"); echo iconv('UTF-8', 'ISO-8859-1', "test"); // WORKING ! echo iconv('ISO-8859-1', 'UTF-8', "test"); // WORKING ! ?> Expected result: ---------------- A verison implementaion and version number and six times "test" Actual result: -------------- Only get 2 "test" string and 4 "tests" fails. Array ( [input_encoding] => ISO-8859-1 [output_encoding] => ISO-8859-1 [internal_encoding] => ISO-8859-1 ) Array ( [0] => xmlwriter ... [16] => mbstring [17] => json [18] => iconv [19] => hash [20] => filter [21] => date [22] => ctype [23] => zlib [24] => bitset ) Array ( ... [iconv] => Array ( [ICONV_IMPL] => unknown [ICONV_VERSION] => unknown [ICONV_MIME_DECODE_STRICT] => 1 [ICONV_MIME_DECODE_CONTINUE_ON_ERROR] => 2 ) ... ) unknown unknown PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /test.php on line 10 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 11 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 14 testtest -- Edit bug report at http://bugs.php.net/?id=47507&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47507&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47507&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47507&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47507&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47507&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47507&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47507&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47507&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47507&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47507&r=support Expected behavior: http://bugs.php.net/fix.php?id=47507&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47507&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47507&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47507&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47507&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47507&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47507&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47507&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47507&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47507&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47507&r=mysqlcfg