Character Encoding

If the compile target is JavaScript, the JS++ Compiler will generate ECMAScript 3-compatible JavaScript code. The character encoding used in this scenario actually depends on the character encoding used by ECMAScript 3. The ECMAScript 3 specification defines character encoding requirements as:

A conforming implementation of this International standard shall interpret characters in conformance with the Unicode Standard, Version 2.1 or later, and ISO/IEC 10646-1 with either UCS-2 or UTF-16 as the adopted encoding form, implementation level 3. If the adopted ISO/IEC 10646-1 subset is not otherwise specified, it is presumed to be the BMP subset, collection 300. If the adopted encoding form is not otherwise specified, it presumed to be the UTF-16 encoding form.

Standard ECMA-262 3rd Edition

Thus, the character encoding depends on the JavaScript engine or web browser you are running your JS++ application from. According to the ECMAScript 3 specification, conforming implementations (JavaScript engines) can utilize either UCS-2 or UTF-16 character encoding. Likewise, when generating JS++ to JavaScript, the character encoding will be either UCS-2 or UTF-16.

If LLVM is the compile target, the default charset is UTF-8. Any valid system charset can also be specified.

External Links


HTML | BBCode | Direct Link