6. Source Text

2010-03-09

This chapter basically tells you that source text is to be treated as Unicode version 3 and up. Every character is actually a 16bit value, regardless. And all text should be normalized.

There's one small catch that could be interesting. Escape characters that occur in comments do not tribute the escaped character to the comment, but the escape sequence itself instead. Most significant example here:

Code: (JS)
var x = 0; // Pointless, I know \n \u000A But wouldn't it be fun?

This might cause a return for the comment in some languages (Java is explicitly mentioned), but not in Javascript. As you will find out, line terminators can have a special meaning.

Other than that, nothing special here.