Open
Description
I encountered this problem when I use this code.
iconv(): Detected an illegal character in input string
Then i change
$converted_text = iconv($sourceCharset, $targetCharset//IGNORE, $text);
to
$converted_text = iconv($sourceCharset, "$targetCharset//IGNORE", $text);
And then pop up the follow error.
iconv(): Detected an incomplete multibyte character in input string.
Final i change the code to
$converted_text = htmlentities($text, ENT_QUOTES, $targetCharset);
It worked fine.
Is there a better way to solve this problem.
Metadata
Metadata
Assignees
Labels
No labels