问题描述
我的网站设置为UTF-8,我必须使用表单的accept-charset将表单设置为utf-8吗?
My website is set to UTF-8, do i have to set my forms also to utf-8 using the accept-charset for forms?
我的留言簿示例允许多语言,所以我的留言板数据库表是utf8_unicode_ci和所有我的网页使用相同的模板,所有页面的编码是utf-8,因为我将我的网页的字符集设置为utf-8我也设置了字符集的形式utf-8或没有,因为我已经为网页本身设置了它?
My guestbook for example allows multilanguage so my guestbook database table is utf8_unicode_ci and all my webpages use the same template so the encoding for all pages is utf-8, because i set the charset for my webpages as utf-8 do i have also set the form charset to utf-8 or no because i already set it for the webpage itself?
为什么我把我的网站转换为utf-8,真的不想去
Reason why is i am converting my website to utf-8 and don't really want to go through all my site forms adding the form charset utf-8 attribute.
感谢任何帮助
推荐答案
几乎每一个像样的浏览器都会忽略 accept-charset
属性,以支持页面的编码,响应头中的<$ c> charset param Content-Type
该属性只在MSIE中工作,即使是,它正在使用错误。在Windows上运行的MSIE中,除UTF-8之外的任何其他值都将被解释为CP-1252。
Almost every decent browser ignores the accept-charset
attribute in favour of the encoding of the page with the form as it is definied in charset
param of the Content-Type
response header. The attribute works as far only in MSIE and even then, it is using it wrong. In MSIE running on Windows, any other value than UTF-8 would be interpreted as CP-1252.
不要使用此属性。这是无用的。
Don't use this attribute. It's useless.
这篇关于是形式字符集需要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!