问题
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