5

I am using the thujohn/PDF-l4 plugin for my Laravel 4 framework. It works fine in local Windows environment. But when moved to my Centos production environment, the following error throws up for PDF conversion.

"iconv(): Wrong charset, conversion from `auto' to `utf-8//IGNORE' is not allowed"

Checked my php-mbstring, but couldn't find anything wrong.

halfer
  • 19,824
  • 17
  • 99
  • 186
winnyboy5
  • 1,486
  • 3
  • 22
  • 45
  • 1
    In which library is the error originating? From what I've seen on the web that error indicates that the target encoding couldn't be found. Either utf8 isn't available on your server (seems unlikely) or the encoding string isn't matching up (maybe "UTF8"?) – BrianS Jul 09 '14 at 01:24
  • @BrianS thanks for the comment the problem lied with the mbstring, which was fixed thanks anyway....... – winnyboy5 Jul 09 '14 at 05:40
  • I have the same problem. Can you post your fix? – Benubird Aug 15 '14 at 16:51
  • 1
    @Benubird I used this meta tag in the export view template "". This fixed the issue....... – winnyboy5 Aug 18 '14 at 05:21
  • 2
    I realise this is a very old post, but in my own researches for a different problem (people apparently mistyping ISO-8859-1 as ISO-8858-1, if you're interested), iconv shows this error message if either encoding specified does not exist (ISO-8858-1 doesn't). Of course, there may be many other circumstances which iconv also shows this error, just sharing what I found. On Linux, iconv -l in a shell shows what character sets are supported. – Mark Bradley Jul 27 '20 at 10:58
  • This comment saved me today – ciberelfo Jul 24 '23 at 08:45

1 Answers1

7

please install PHP mbstring and xml extensions on CentOS

  • Meta tag was causing the issue actually and fixed it. I checked on the mbstring and extensions at the start. Thanks for your answer anyway :) – winnyboy5 Nov 29 '14 at 10:49
  • 8
    how do you mean "meta tag" ?? how did you fix the issue ? – Phil Feb 09 '18 at 10:37