ID: 47507
Comment by: aboh24 at gmx dot de
Reported By: aboh24 at gmx dot de
Status: Open
Bug Type: ICONV related
Operating System: Solaris 10 / 64-bit
PHP Version: 5.2.8
New Comment:
I rebuilt the codes with -m32 (this is default and means 32-bit
binaries) and it is the same problem.
Previous Comments:
------------------------------------------------------------------------
[2009-02-26 07:12:49] aboh24 at gmx dot de
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 this bug report at http://bugs.php.net/?id=47507&edit=1