kalsolio
V2EX  ›  问与答

Rails 为什么要使用这个对钩呢?

  •  
  •   kalsolio · Jul 8, 2016 · 1954 views
    This topic created in 3606 days ago, the information mentioned may be changed or developed.
    <input name="utf8" type="hidden" value="✓"/>

    utf8=✓

    2 replies    2016-07-11 15:51:53 +08:00
    kikyous
        1
    kikyous  
       Jul 8, 2016   ❤️ 1
    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
    kalsolio
        2
    kalsolio  
    OP
       Jul 11, 2016
    @kikyous 感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   873 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:05 · PVG 06:05 · LAX 15:05 · JFK 18:05
    ♥ Do have faith in what you're doing.