Bug #44096 [Com]: iconv: wrong charset
Edit report at http://bugs.php.net/bug.php?id=44096edit=1 ID: 44096 Comment by: icovt at yahoo dot com Reported by: cpuidle at gmx dot de Summary: iconv: wrong charset Status: No Feedback Type: Bug Package: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: mod_php iconv() is not working properly if your apache is chrooted and you do not have the content of /usr/lib/gconv/ folder into your relative chroot path (i.e. /your/chroot/path/usr/lib/gconv/). You can simply do: cp /usr/lib/gconv/* /your/chroot/path/usr/lib/gconv/ ... and re-try. This was a fix for me, hope this could save time for somebody else. P.S. Btw, initially iconv() called from command line (using php cli) was OK. Previous Comments: [2009-03-10 13:31:55] cancausecancerr at yahoo dot com dot cn I found my problem. It was 'utf8' vs. 'utf-8'. I peeked inside Zend Lucene Lucene's code and saw it was looking for 'utf8' or 'utf-8' so I thought I'd save a byte and take 'utf8' (shakes fist at Zend then at self:: for being cheap). I echo'd out what Zend Lucene was populating the iconv() with and that's where I saw my prob. As for the reason my english data wasn't raising this error, I indexed those tables with 'utf-8'. So it seems my error was the same as everyone elses (encoding type didn't exist on my systema) [2009-03-10 12:58:53] cancausecancerr at yahoo dot com dot cn I got the error while querying a lucene index I just created from a mysql utf8 table (populated with danish data). When I created the index I used 'utf8' while adding fields so everything should be fine. I don't get the error when I query my other tables which have english data and were created in exactly the same manner. Notice: iconv() [function.iconv]: Wrong charset, conversion from `utf8' to `ASCII//TRANSLIT' is not allowed in Z:\Zend\Search\Lucene\Analysis\Analyzer\Common\Text.php on line 57 Windows NT 5.1 build 2600 Apache/2.2.4 MySQL 5.1.22-rc-community PHP Version 5.2.6 PHPINFO ICONV: iconv support enabled iconv implementationlibiconv iconv library version 1.11 Directive Local Value Master Value iconv.input_encodingISO-8859-1 ISO-8859-1 iconv.internal_encoding ISO-8859-1 ISO-8859-1 iconv.output_encoding ISO-8859-1 ISO-8859-1 [2009-02-26 06:25:15] aboh24 at gmx dot de Same problem on Solaris 10 and explicit compiled and linked libiconv-1.12 and php 5.2.8. with --with-iconv-dir=path to libiconv-1.12 lib PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 39 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 40 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 42 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 43 [2009-02-12 06:40:47] niloat at gmail dot com Please check whether necessary so files exists in /usr/lib/gconv. You can copy those files from other's linux system if missing someone. [2008-05-13 05:11:40] iconv dot 20 dot cheef-daniel at spamgourmet dot com Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', test); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', test); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test); // works not The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=44096 -- Edit this bug report at http://bugs.php.net/bug.php?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: cancausecancerr at yahoo dot com dot cn Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: I got the error while querying a lucene index I just created from a mysql utf8 table (populated with danish data). When I created the index I used 'utf8' while adding fields so everything should be fine. I don't get the error when I query my other tables which have english data and were created in exactly the same manner. Notice: iconv() [function.iconv]: Wrong charset, conversion from `utf8' to `ASCII//TRANSLIT' is not allowed in Z:\Zend\Search\Lucene\Analysis\Analyzer\Common\Text.php on line 57 Windows NT 5.1 build 2600 Apache/2.2.4 MySQL 5.1.22-rc-community PHP Version 5.2.6 PHPINFO ICONV: iconv support enabled iconv implementationlibiconv iconv library version 1.11 Directive Local Value Master Value iconv.input_encodingISO-8859-1 ISO-8859-1 iconv.internal_encoding ISO-8859-1 ISO-8859-1 iconv.output_encoding ISO-8859-1 ISO-8859-1 Previous Comments: [2009-02-26 06:25:15] aboh24 at gmx dot de Same problem on Solaris 10 and explicit compiled and linked libiconv-1.12 and php 5.2.8. with --with-iconv-dir=path to libiconv-1.12 lib PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 39 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 40 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 42 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 43 [2009-02-12 06:40:47] niloat at gmail dot com Please check whether necessary so files exists in /usr/lib/gconv. You can copy those files from other's linux system if missing someone. [2008-05-13 05:11:40] iconv dot 20 dot cheef-daniel at spamgourmet dot com Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', test); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', test); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test); // works not [2008-04-17 08:41:49] i dot pavlov at korekom dot net The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. [2008-02-25 01:31:35] ras...@php.net Weird Windows-specific thing. The test case works fine on 6 different UNIX variants I just tried it on. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44096 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: cancausecancerr at yahoo dot com dot cn Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: I found my problem. It was 'utf8' vs. 'utf-8'. I peeked inside Zend Lucene Lucene's code and saw it was looking for 'utf8' or 'utf-8' so I thought I'd save a byte and take 'utf8' (shakes fist at Zend then at self:: for being cheap). I echo'd out what Zend Lucene was populating the iconv() with and that's where I saw my prob. As for the reason my english data wasn't raising this error, I indexed those tables with 'utf-8'. So it seems my error was the same as everyone elses (encoding type didn't exist on my systema) Previous Comments: [2009-03-10 12:58:53] cancausecancerr at yahoo dot com dot cn I got the error while querying a lucene index I just created from a mysql utf8 table (populated with danish data). When I created the index I used 'utf8' while adding fields so everything should be fine. I don't get the error when I query my other tables which have english data and were created in exactly the same manner. Notice: iconv() [function.iconv]: Wrong charset, conversion from `utf8' to `ASCII//TRANSLIT' is not allowed in Z:\Zend\Search\Lucene\Analysis\Analyzer\Common\Text.php on line 57 Windows NT 5.1 build 2600 Apache/2.2.4 MySQL 5.1.22-rc-community PHP Version 5.2.6 PHPINFO ICONV: iconv support enabled iconv implementationlibiconv iconv library version 1.11 Directive Local Value Master Value iconv.input_encodingISO-8859-1 ISO-8859-1 iconv.internal_encoding ISO-8859-1 ISO-8859-1 iconv.output_encoding ISO-8859-1 ISO-8859-1 [2009-02-26 06:25:15] aboh24 at gmx dot de Same problem on Solaris 10 and explicit compiled and linked libiconv-1.12 and php 5.2.8. with --with-iconv-dir=path to libiconv-1.12 lib PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 39 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 40 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 42 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 43 [2009-02-12 06:40:47] niloat at gmail dot com Please check whether necessary so files exists in /usr/lib/gconv. You can copy those files from other's linux system if missing someone. [2008-05-13 05:11:40] iconv dot 20 dot cheef-daniel at spamgourmet dot com Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', test); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', test); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test); // works not [2008-04-17 08:41:49] i dot pavlov at korekom dot net The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44096 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: aboh24 at gmx dot de Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: Same problem on Solaris 10 and explicit compiled and linked libiconv-1.12 and php 5.2.8. with --with-iconv-dir=path to libiconv-1.12 lib PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 39 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 40 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 42 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 43 Previous Comments: [2009-02-12 06:40:47] niloat at gmail dot com Please check whether necessary so files exists in /usr/lib/gconv. You can copy those files from other's linux system if missing someone. [2008-05-13 05:11:40] iconv dot 20 dot cheef-daniel at spamgourmet dot com Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', test); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', test); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test); // works not [2008-04-17 08:41:49] i dot pavlov at korekom dot net The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. [2008-02-25 01:31:35] ras...@php.net Weird Windows-specific thing. The test case works fine on 6 different UNIX variants I just tried it on. [2008-02-24 23:45:29] darop68 at poczta dot onet dot pl I have the same problem in php 5.2.5. My code: iconv('iso-8859-2', 'utf-8', 'test'); The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44096 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: niloat at gmail dot com Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: Please check whether necessary so files exists in /usr/lib/gconv. You can copy those files from other's linux system if missing someone. Previous Comments: [2008-05-13 05:11:40] iconv dot 20 dot cheef-daniel at spamgourmet dot com Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', test); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', test); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test); // works not [2008-04-17 08:41:49] i dot pavlov at korekom dot net The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. [2008-02-25 01:31:35] ras...@php.net Weird Windows-specific thing. The test case works fine on 6 different UNIX variants I just tried it on. [2008-02-24 23:45:29] darop68 at poczta dot onet dot pl I have the same problem in php 5.2.5. My code: iconv('iso-8859-2', 'utf-8', 'test'); [2008-02-22 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44096 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: iconv dot 20 dot cheef-daniel at spamgourmet dot com Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', test); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', test); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test); // works not Previous Comments: [2008-04-17 08:41:49] i dot pavlov at korekom dot net The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. [2008-02-25 01:31:35] [EMAIL PROTECTED] Weird Windows-specific thing. The test case works fine on 6 different UNIX variants I just tried it on. [2008-02-24 23:45:29] darop68 at poczta dot onet dot pl I have the same problem in php 5.2.5. My code: iconv('iso-8859-2', 'utf-8', 'test'); [2008-02-22 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-02-14 22:45:38] [EMAIL PROTECTED] Another reason for this is that those encodings just don't exist on your platform. The code works fine for me on Linux.. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44096 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: i dot pavlov at korekom dot net Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. Previous Comments: [2008-02-25 01:31:35] [EMAIL PROTECTED] Weird Windows-specific thing. The test case works fine on 6 different UNIX variants I just tried it on. [2008-02-24 23:45:29] darop68 at poczta dot onet dot pl I have the same problem in php 5.2.5. My code: iconv('iso-8859-2', 'utf-8', 'test'); [2008-02-22 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-02-14 22:45:38] [EMAIL PROTECTED] Another reason for this is that those encodings just don't exist on your platform. The code works fine for me on Linux.. [2008-02-13 19:01:42] cpuidle at gmx dot de See test case- file is ansi, not even any complex characters? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44096 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: darop68 at poczta dot onet dot pl Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: I have the same problem in php 5.2.5. My code: iconv('iso-8859-2', 'utf-8', 'test'); Previous Comments: [2008-02-22 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-02-14 22:45:38] [EMAIL PROTECTED] Another reason for this is that those encodings just don't exist on your platform. The code works fine for me on Linux.. [2008-02-13 19:01:42] cpuidle at gmx dot de See test case- file is ansi, not even any complex characters? [2008-02-13 17:52:17] [EMAIL PROTECTED] In what charset is the input here..? [2008-02-11 08:40:15] cpuidle at gmx dot de Description: Trying simple charset conversion with iconv: iconv('iso-8859-1', 'utf-8', 'test'); receive this error: Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO8859-1' to `UTF-8' is not allowed in /var/htdocs/test.php on line 5 Problem: no troubleshooting information available, e.g. list or supported charsets or similiar. How can this be diagnosed? Reproduce code: --- error_reporting(E_ALL); $res = iconv('iso-8859-1', 'utf-8', 'test'); Expected result: No error and/or supporting functions to aid diagnostics. Actual result: -- Error message: Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO8859-1' to `UTF-8' is not allowed in /var/htdocs/test.php on line 5 -- Edit this bug report at http://bugs.php.net/?id=44096edit=1