Detecting utf8 encoding errors
While working with Froogle, the datafeed is constantly bugging me with encoding problems in so开发者_Python百科me article-descriptions.
The script, string and output is utf8 encoded, but I can't find the characters that cause the problem.
is there a way to detect troublesome characters?
Try using the htmlentities function for your string.
echo htmlentities($your_str, ENT_QUOTES);
And then use, html_entity_decode
function to read back with utf8 as parameter.
精彩评论