Why do some websites have ?utf8=✓ in their title?

后端 未结 1 2071
猫巷女王i
猫巷女王i 2020-12-07 20:13

I\'ve noticed that a lot of websites, when searching or just browsing, will add a get variable called utf and set it equal to a check mark (?utf8=✓

相关标签:
1条回答
  • 2020-12-07 20:40

    URIs contain utf8=✓ to force the client to send UTF-8.
    It works because the key-value-pair (which is ignored by the target) contains a unicode-only character.

    From Is the use of “utf8=✓” preferable to “utf8=true”?:

    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.

    0 讨论(0)
提交回复
热议问题