I have a string coming from MySql DB, encoded in utf8mb4. I am rendering a pdf with FPDF for PHP, and I tried to convert it with iconv:
iconv('utf8mb4', 'cp1252',$myString);
This fails telling me "Notice: iconv(): Wrong charset, conversion from utf8mb4' to
cp1252' is not allowed".
If I try with
iconv('utf-8', 'cp1252',$myString);
I get "Notice: iconv(): Detected an illegal character in input string".
Without iconv I get multiple ascii chars in place of special chars, and it is not fine.
Is there any way to output this value correctly?
try this one to IGNORE character which is not allowed in the charset