What could go wrong in switching HTML encoding from UTF-8 to UTF-16?

前端 未结 6 1275
北荒
北荒 2021-01-13 02:44

What are the implications of a change from UTF-8 to UTF-16 for HTML encoding? I would like to know your thoughts on the issue. Are there things I need to think of before m

6条回答
  •  悲哀的现实
    2021-01-13 03:25

    I can think of a few things that will go wrong:

    1. You MUST specify that it's UTF-16 in the HTTP header. Unlike UTF-8, UTF-16 is not ASCII compatible, which means that everything needs to be in UTF-16 from the start.
    2. Older clients don't support UTF-16. For example, anything on Windows 9x. Possibly Mac OS9 as well.
    3. Oh, wait, I almost forgot: North America and European copies of Windows XP don't have Asian fonts installed by default.

提交回复
热议问题