ID:               47507
 User updated by:  aboh24 at gmx dot de
 Reported By:      aboh24 at gmx dot de
-Status:           Feedback
+Status:           Open
 Bug Type:         ICONV related
 Operating System: Solaris 10 / 64-bit
 PHP Version:      5.2.8
 New Comment:

ok - please give me time until end of next week.


Previous Comments:
------------------------------------------------------------------------

[2009-04-27 15:57:38] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

[2009-02-26 10:29:13] aboh24 at gmx dot de

This could maybe useful:

user# /usr/lib/iconv/UTF-8%ISO8859-1*
/usr/lib/iconv/UTF-8%ISO8859-11.so


it is mentioned in the truss output of the test php program:

access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt",
R_OK) Err#2 ENOENT
access("/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so", R_OK) Err#2
ENOENT
open("/usr/lib/iconv/alias", O_RDONLY)          = 3
fstat64(3, 0xFFBFEE60)                          = 0
mmap(0x00000000, 6311, PROT_READ, MAP_SHARED, 3, 0) = 0xFF3A0000
close(3)                                        = 0
munmap(0xFF3A0000, 6311)                        = 0
access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt",
R_OK) Err#2 ENOENT
access("/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so", R_OK) Err#2
ENOENT
PHP Notice:  iconv(): Wrong charset, conversion from `UTF-8' to
`ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13write(2, "
P H P   N o t i c e :  ".., 151)      = 151

write(2, "\n", 1)

------------------------------------------------------------------------

[2009-02-26 08:59:45] aboh24 at gmx dot de

truss ./test.php
...
access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%8859-1.bt", R_OK)
Err#2 ENOENT
access("/usr/lib/iconv/UTF-8%8859-1.so", R_OK)  = 0
stat("/usr/lib/iconv/UTF-8%8859-1.so", 0xFFBFE8A0) = 0
resolvepath("/usr/lib/iconv/UTF-8%8859-1.so",
"/usr/lib/iconv/UTF-8%8859-1.so", 1023) = 30
open("/usr/lib/iconv/UTF-8%8859-1.so", O_RDONLY) = 4
...


Althoug the php was build with a local libiconv and explicit setting of
the prefix-path and LD_LIBRARY_PATH and --with-iconv-dir, etc. the
system want to load the iconv from  /usr/lib/iconv which do not
exists... :-(

------------------------------------------------------------------------

[2009-02-26 07:52:46] aboh24 at gmx dot de

I rebuilt the codes with -m32 (this is default and means 32-bit
binaries) and it is the same problem.

------------------------------------------------------------------------

[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

Reply via email to