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?
UTF-16 is an encoding of Unicode in which each character is composed of either one or two 16-bit elements. Unicode was originally designed as a pure 16-bit encoding, aimed at representing all modern scripts.
The Difference Between Unicode and UTF-8Unicode is a character set. UTF-8 is encoding. Unicode is a list of characters with unique decimal numbers (code points).
UTF-8 is an encoding system for Unicode. It can translate any Unicode character to a matching unique binary string, and can also translate the binary string back to a Unicode character. This is the meaning of “UTF”, or “Unicode Transformation Format.”
The main difference between UTF-8, UTF-16, and UTF-32 character encoding is how many bytes it requires to represent a character in memory. UTF-8 uses a minimum of one byte, while UTF-16 uses a minimum of 2 bytes.
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.)
Use UTF-8 for JavaScript, don't bother with UTF-16 or any of its variants (for JavaScript; this advice doesn't apply generally).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With