

To preserve appearance of the source to those using Unicode editors and The other decoding method simply decodes each Unicode escape into the The exact Unicode source can later be restored from this ASCII formīy converting each escape sequence where multiple u's are present toĪ sequence of Unicode characters with one fewer u, while simultaneouslyĬonverting each escape sequence with a single u to the corresponding Reverses the above encoding with no loss of information:
#CODEPOINTS BMP CODE#
The same section of the JLS also defines two ways ofĭecoding such text back into a sequence of 16 bit code points. Since the Unicode escape defined above can only represent a 16 bit (2īyte) code point. We call this encoding form/scheme UTF-J2, Written out at one byte per resulting ASCII character, thisĮncoding scheme. Therefore no longer be considered an actual Unicode escape. Sequence immediately following this odd number of slashes, which will Odd number of slashes? The above encoding will produce a Unicode escape Where the total number of slashes (if any) immediately precedingīe fixed: What if a non-ASCII character occurs immediately after an The JLS defines a Unicode escape effectively as '\\' 'u'+ In the source text to a \uxxxx escape containing a single u. Text of the program to ASCII by adding an extra u - for example, \uxxxxīecomes \uuxxxx - while simultaneously converting non-ASCII characters Transformation involves converting any Unicode escapes in the source Of transforming a program written in Unicode into ASCII that changesĪ program into a form that can be processed by ASCII-based tools. The Java programming language specifies a standard way

Language Specification (the JLS) effectively defines a character This would be too great a burden on non-English-based programmers wishing To ASCII, and therefore that all non-ASCII source characters may onlyīe expressed using Backslash-u Decoding. Backgroundīecause we do not yet have any personal experience withĬharacters at the time of this writing, we considered specifying that Readers concerned only with ASCII source texts.
