分享 <input name="utf8" type="hidden" value="✓"/> 的作用

kikyous · 2016年07月08日 · 2040 次阅读

By default, older versions of IE (<=8) will submit form data in Latin-1 encoding if possible. By including a character that can't be expressed in Latin-1, IE is forced to use UTF-8 encoding for its form submissions, which simplifies various backend processes, for example database persistence.

If the parameter was instead utf8=true then this wouldn't trigger the UTF-8 encoding in these browsers.

http://programmers.stackexchange.com/questions/168751/is-the-use-of-utf8-preferable-to-utf8-true

一直不知道这个有什么用 😅

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号