JavaScript 1.3 Overview, Part I: Unicode - Doc JavaScript
Unicode
The Unicode standard is a fixed-width uniform encoding scheme. Its target usage is for interchange and display of many different languages, as well as historic scripts, technical and mathematical symbols, and multilingual texts. The Unicode standard specifies the identity of the character and its numeric value. The 16-bit numeric value is defined by a hexadecimal number and a prefix \u
(backslash followed by a lowercase u). The Unicode value \u0041
, for example, represents the character A
. The Unicode unique name for this character is LATIN CAPITAL LETTER A
.
Unicode is compatible with ASCII characters. The first 128 Unicode characters correspond to the ASCII characters and have the same numeric value. ASCII's 0x41
is the same as Unicode's \u0041
. While ASCII's 128 characters supports just the Latin alphabet, Unicode's over 65,000 characters can support many different languages. Unicode is fully compatible with ISO's 10646-1 and UCS-2 standards. JavaScript programs will still be written in the ASCII-set characters. You can use non-ASCII Unicode characters in the comments and string literals of JavaScript.
The calculator below accepts a Unified code value (just the four hexadecimal characters, no \u
) and prints the corresponding character in the middle of the following sentence: "Unicode Demo:<Unicode Character>Netscape Corporation.