If the page is already interpreted by the browser as being UTF-8, setting accept-charset="utf-8"
does nothing.
If you set the encoding of the page to UTF-8 in a <meta>
and/or HTTP header, it will be interpreted as UTF-8, unless the user deliberately goes to the View->Encoding menu and selects a different encoding, overriding the one you specified.
In that case, accept-encoding
would have the effect of setting the submission encoding back to UTF-8 in the face of the user messing about with the page encoding. However, this still won't work in IE, due the previous problems discussed with accept-encoding
in that browser.
So it's IMO doubtful whether it's worth including accept-charset
to fix the case where a non-IE user has deliberately sabotaged the page encoding (possibly messing up more on your page than just the form).
Personally, I don't bother.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…