-1

I have a Laravel 4.2 application which renders text to a PDF using dom2pdf (0.4) which works fine on the dev server but not live. It throws a 'iconv(): Detected an illegal character in input string' error on live which I believe is due to a long hyphen ( – ) in the text. Each system is using exactly the same data.

Is there a setting on the live server to work around this? All text is stored as utf8_unicode_ci in the MySQL database, and the html for the PDF has a utf-8 charset directive in the header. Both servers are running Apache/CentOS/Cpanel, dev server is running PHP Version 5.5.38 while live is 5.5.34.

rev_dev_01
  • 500
  • 3
  • 20

1 Answers1

0

Found the issue - it was because the mbstring PHP extension was not installed on the live server. If this is absent Laravel/dom2pdf falls back to its own mbstring implementation which was failing in my case.

Now mbstring is installed it works fine. Thanks to those who looked.

rev_dev_01
  • 500
  • 3
  • 20