Is there any disadvantage of using: text/plain; charset=“UTF-8”

后端 未结 3 2230
萌比男神i
萌比男神i 2021-02-18 13:01

My web server serves content that is in 95% of the time just simple ascii. However in some rare cases, the content contains some German non-ascii characters.

Now I coul

相关标签:
3条回答
  • 2021-02-18 13:42

    ASCII is a subset of UTF-8, so it is perfectly safe to declare the charset as utf-8 for an all-ASCII document.

    0 讨论(0)
  • 2021-02-18 13:53

    No, there is no disadvantage -- but you'll need to spell "utf-8" correctly.

    0 讨论(0)
  • 2021-02-18 13:54

    Nope, all it's there for is to tell the browser which character set to decode your response with.

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