What exactly is Unicode codepage 1200?

白昼怎懂夜的黑 提交于 2021-01-02 05:56:45

问题


While investigating some localization options, I stumbled across this as a save option in Visual Studio.

What is Unicode code page 1200 exactly?

The Microsoft documentation page Code Page Identifiers describes:

Unicode UTF-16, little endian byte order (BMP of ISO 10646); available only to managed applications

So is Unicode code page 1200 really UTF-16 and therefore has a BOM?

Is it advisable to use this for JavaScript then, and if we have to use this, is a charset declaration necessary in the script tag?


回答1:


Code page 1200 is UTF-16 little endian, and does not imply BOM or not. For anything web use UTF-8 (everything: css, html, javascript, etc.)




回答2:


Use UTF-8 for JavaScript, don't bother with UTF-16 or any of its variants (for JavaScript; this advice doesn't apply generally).




回答3:


According to Microsoft documentation about the Code Page Identifiers, code page 1200 means the following:

Unicode UTF-16, little endian byte order (BMP of ISO 10646); available only to managed applications

Likewise 1201 is the same, but with big endian byte order.

Unicode UTF-16, big endian byte order; available only to managed applications



来源:https://stackoverflow.com/questions/8336355/what-exactly-is-unicode-codepage-1200

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!