开发者

UTF8 Russian or Asian strings, help with encoding in PHP

开发者 https://www.devze.com 2023-02-28 03:22 出处:网络
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

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

精彩评论

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