I encountered this problem when I use this code. ``` iconv(): Detected an illegal character in input string ``` Then i change ``` php $converted_text = iconv($sourceCharset, $targetCharset//IGNORE, $text); ``` to ``` php $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 ``` php $converted_text = htmlentities($text, ENT_QUOTES, $targetCharset); ``` It worked fine. Is there a better way to solve this problem.