开发者

Charset change after DOM manipulation

开发者 https://www.devze.com 2023-04-12 06:26 出处:网络
I\'ve run into an odd problem while doing my PHP/JS chat. At the moment I\'m storing chat history into txt file in UTF-8 encoding. After you load the page PHP script grabs previous history, print it i

I've run into an odd problem while doing my PHP/JS chat. At the moment I'm storing chat history into txt file in UTF-8 encoding. After you load the page PHP script grabs previous history, print it into a div and starts JScript with interval of 5sec which is supposed to refresh the div area using a textgrabber PHP script. Here's my problem: After AJAX call which grabs history from the text file my charset encoding seems to get screwed. I get questionmarks instead of chars with punctuntion (such as č/š/ě) but when I display sourcecode of the webpage the coding is correct. Is it possible that DOM manipulation somehow changes pa开发者_C百科ge's charset setup?

0

精彩评论

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

关注公众号