10

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?

Mofi
  • 46,139
  • 17
  • 80
  • 143
muffin
  • 259
  • 1
  • 3
  • 11
  • If the codepage specifies the byte order as the documentation you quote shows then a BOM is not supposed to be used. In other words, UTF-16 little endian is not permitted to have a BOM, according to the Unicode standard. See Table 2-4: http://www.unicode.org/versions/Unicode6.0.0/ch02.pdf – bames53 Dec 01 '11 at 16:14
  • Thank you! I thought that BOM is attached for UTF 16, but finally got it cleared up now. – muffin Dec 02 '11 at 02:08

3 Answers3

18

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.)

Mihai Nita
  • 5,547
  • 27
  • 27
4

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

Marc.2377
  • 7,807
  • 7
  • 51
  • 95
Ana Betts
  • 73,868
  • 16
  • 141
  • 209
0

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

zar
  • 11,361
  • 14
  • 96
  • 178
  • That's just a duplicate of the question though... doesn't give any meaningful answer –  May 31 '21 at 13:58