Bug #44096 [Com]: iconv: wrong charset

From: Date: Mon, 28 Dec 2015 10:19:08 +0000
Subject: Bug #44096 [Com]: iconv: wrong charset
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198257@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=44096&edit=1 ID: 44096 Comment by: michal at cihar 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 Block user comment: N Private report: N New Comment: We've seen this several times on phpMyAdmin, see https://github.com/phpmyadmin/phpmyadmin/issues/11787/ In most cases this has happened on Windows or Mac, though there are few errors from Linux servers as well. Happens with many PHP versions (at least 5.3, 5.4, 5.5, 5.6 and 7.0). Previous Comments: ------------------------------------------------------------------------ [2014-07-15 21:19:58] aj07mm at hotmail dot com Same prob here Notice: iconv(): Wrong charset, conversion from utf8' to ascii//TRANSLIT' is not allowed my charset: 'input_encoding' => string 'ISO-8859-1' (length=10) 'output_encoding' => string 'ISO-8859-1' (length=10) 'internal_encoding' => string 'ISO-8859-1' (length=10) ------------------------------------------------------------------------ [2010-06-07 23:22:39] icovt at yahoo dot com 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. ------------------------------------------------------------------------ [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 implementation "libiconv" iconv library version 1.11 Directive Local Value Master Value iconv.input_encoding ISO-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 ------------------------------------------------------------------------ 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 https://bugs.php.net/bug.php?id=44096 -- Edit this bug report at https://bugs.php.net/bug.php?id=44096&edit=1

« previous php.bugs (#198257) next »