开发者

UTF8 Russian or Asian strings, help with encoding in PHP

I am having trouble properly encoding UTF8 strings. I am fetching data from meta title/description data of remote international website and then I use javascript to place the string into a input text box.

Some sites encode properly, however some do not and return odd characters. For example two sites I am having trouble are: http://www.telki.ru/ (careful: adult content) and http://www.backchina.com/

I have tried utf8_encod开发者_Python百科e,decode etc, but cannot figure out a universal solution that will work with all sites. Help please!


Parse the HTTP response headers and the META tags for the appropriate charset to use.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜