开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜