为什么所有的React应用开头都有一行meta charset=utf-8语句?
答案:
The previous HTML standard (HTML 4) specified the ISO-8859-1 character set as the default. When HTML5 was released, the specification was updated to default to UTF-8. UTF-8 is a much more flexible character set, and can support languages from all over the world.
The React framework defaults to reading ISO-8859-1 characters. So, if we don’t tell it to use UTF-8 (which is what SAP Cloud Platform uses), React will not understand the characters and will throw several syntax errors.
The tag is now the recommended best practice in all HTML.要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的为什么所有的React应用开头都有一行meta charset=utf-8语句?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 王者荣耀超值英雄秘宝窍门有哪些
- 下一篇: How is setModel trig