Since JavaScript 1.3 and JScript 3.0, the language has been built around the Unicode standard. This means its identifiers and hence its script source code is intended to be represented by a sequence of Unicode characters. The benefit of this is that identifiers can be named using international characters. The reality is that some implementations don't support this very well, even if they can parse and process Unicode correctly as data.
As is the case with many languages, there may be a character set that can be used for data and a smaller sub-set that is valid for use when editing script source text.
Strictly speaking, a JavaScript script source can be encoded with 7 bit ASCII characters since there are mechanisms to escape generated character codes that are multi-byte Unicode code points.
The Unicode standard describes a large number of international character sets in terms of the character glyphs supported by them. There are also a large number of ISO standardized character sets.
Prev | Home | Next |
Character handling | Up | Character testing |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |