There is a simple hack to this:
Insert a hidden input field in the form with an entity which only occur in the character set the server your posting (or doing a GET) to accepts.
Example: If the form are located on a server serving ISO-8859-1 and the form will post to a server expecting UTF-8 insert something like this in the form:
<input name="iehack" type="hidden" value="☠" />
IE will then "detect" that the form contains a UTF-8 character and use UFT-8 when you POST or GET. Strange, but it does work.
本文介绍了解决Internet Explorer浏览器不正确识别表单accept-charset属性的问题,通过JavaScript判断及修改文档字符集来确保表单数据能以正确的编码格式提交。
742







在提交页面中字符编码最好与后台处理编码一致。 – tonyzhang 2012-08-23