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

前端 未结 6 1319
北荒
北荒 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:21

    As far as I know all modern browsers support UTF-16 encoding. But as others have pointed out, you should declare the encoding explicitly. Not all browsers and platforms will support all unicode characters, but I think this is regardless of which encoding you use.

    However, if bandwith is a big issue you should probably consider gzipping the HTML. This will save much more bandwidth than switching encoding.

提交回复
热议问题