SvennD
July 15, 2015

iconv_strlen(): Wrong charset, conversion from 8bit to UCS-4LE is not allowed

Posted on July 15, 2015  •  1 minutes  • 105 words  •  Suggest Changes

While working with codeigniter & dompdf  I hit upon this crazy error, while generating a pdf:

iconv_strlen(): Wrong charset, conversion from 8bit to UCS-4LE is not allowed

While this looks like a PHP error, it seems its actually missing some library.  Since I work on a Centos 6.5 machine and still wanted a new version of PHP I used webtastic. That is a precompiled yum repo, makes live allot easier. So just install this bad boy, once webtastic is installed :

yum install php55w-mbstring

Restart your httpd service and voila, problem solved!

Based on this post I believe in debian php-mbstring is installed per default;

 

 

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper