My page have meta tag for UTF-8,
I created an iframe editor with;
document.getElementById('myeditor').contentWindow.document.designMode="on";
document.getElementById('myeditor').contentWindow.document.close();
and getting the value of this iframe with;
$('#myeditor').contents().find('body').html() or ('#myeditor').contents().find('body').text()
开发者_如何学JAVA
both worked in chrome, firefox but IE return value has different encoding
the entered text(original) = "çöşiğüişçö" (or something similar)
database value when i get from chrome = çöişçöişüğ çöişüğişçöişüğ çö (This is ok for me.)
database value when i get from IE = çöiþçöiþüðiþçöiþüðiþçöiþüðþö
i tried to change meta in the iframe but nothing works. when i look at the code in ie webtool, iframe has a meta tag which is " meta name="GENERATOR" content="MSHTML 9.00.8112.16434" "
Please help me.
(IE9)
They text you're entering is not likely in UTF-8 format.
精彩评论