JLS bug (unicode escapes)?
Reinier Zwitserloot
reinier at zwitserloot.com
Thu Jan 7 03:48:09 PST 2010
Am I reading this:
http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.3
correctly?
A UnicodeMarker seems to be defined as, in regexp terms: "u+" instead of the
expected "u". So, that would mean:
\uuuuuuuuuuuuuuuuuuuuuuu0041 will still turn into "A" just like \u0041
would. What on earth is the thinking behind this?
Amazingly, I tested this in javac and it actually works:
System.out.println("\uuuuuuuu0041"); will print 'A' to stdout. At the very
least the descriptive text in chapter 3.3 should highlight this oddity. Even
ECJ gets this right.
NB: what's the appropriate venue for discussing oddities in the JLS?
--Reinier Zwitserloot
More information about the coin-dev
mailing list