Community
Participate
Working Groups
javac6 and Eclipse 3.7 reports an error on using a variable declaration of kind 'char a\u200b;' However, Eclipse with Java 7 support patch doesn't report this as an error in 1.6 mode. Note that javac7 doesn't report this as an error and hence it is appropriate that this should not flagged as an error in 1.7 projects, but this may not be right for 1.7- projects. I don't understand the character and hence couldn't comment, but there is a difference.
(In reply to comment #0) > but this may not be > right for 1.7- projects. I don't understand the character and hence couldn't I think you meant 1.6- (1.6 and below)
(In reply to comment #1) > (In reply to comment #0) > > > but this may not be > > right for 1.7- projects. I don't understand the character and hence couldn't > > I think you meant 1.6- (1.6 and below) Yes I did mean 1.6 and below.
I'll check if this character's category also changed.
Ok, that character was in the Zs group in Unicode 4 and has been moved to the Cf group in Unicode 6. This means that before it was forbidden as part of a java identifier, and now it is permitted. I can tweak that, but I don't know if this is the right way to fix this issue. It looks like I need to check all Unicode 4 characters based on their original specification even if their categories have been changed since then.
I forgot to mention that "Zs" means SPACE_SEPARATOR group. "Cf" means FORMAT group. Characters in the Zs group are illegal as a java identifier part, but characters in the Cf group are fine. This explains the difference.
Released in BETA_JAVA7 branch. Added regression test in: org.eclipse.jdt.core.tests.compiler.regression.ScannerTest#test059
Verified for 3.8M1 using build I20110729-1200
See follow up issue: bug 578063.