【发布时间】:2011-04-12 19:24:35
【问题描述】:
对于已经指定的页面(通过 HTTP 标头或元标记),具有带有 UTF-8 字符集的 Content-Type...将accept-charset="UTF-8" 添加到 HTML 表单是否有好处?
(我知道accept-charset 属性在 IE 中针对 ISO-8859-1 已损坏,但我还没有听说 IE 和 UTF-8 存在问题。我只是问添加它是否有好处使用 UTF-8,以帮助防止输入无效的字节序列。)
【问题讨论】:
-
我的问题更具体......但相关:stackoverflow.com/questions/3715264/… 和 stackoverflow.com/questions/1317152/…
-
相关 W3C 参考:w3.org/TR/html401/interact/forms.html#adef-accept-charset(注意
User agents may interpret this value as the character encoding that was used to transmit the document中的“可能” - 这是否意味着明确提及它更安全?不确定。根据我的经验,我同意 @elusive 所说的) )
标签: html forms encoding utf-8 character-encoding