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

kikyous · July 08, 2016 · 2033 hits

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

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

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.