Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352014 - \u1369 no longer accepted as a valid java identifier part
Summary: \u1369 no longer accepted as a valid java identifier part
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 14:26 EDT by Olivier Thomann CLA
Modified: 2011-08-05 02:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2011-07-13 14:26:48 EDT
The original Unicode 4.0 specification (java version <= 1.6) specifies that this character is a valid java identifier part (Nd category).
1369;ETHIOPIC DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;

When working on adding Unicode 6 support, I rebuilt the scanner resource file for java 1.6 also and I introduced a problem for this character since in the Unicode 6 specification, it has been reclassified inside the No category which does no longer make it a valid java identifier part. This was done even if the character was introduced in Unicode 3.0.

      <char cp="1369" age="3.0" na="ETHIOPIC DIGIT ONE" JSN="" gc="No" .../>

So this code:

public class X {
  int a\u1369b;
}

should compile with compliance 1.6, but no longer compile with compliance 1.7 or above.
You can check that by compiling it using javac 1.6 and then using latest (b147) javac 1.7.
Comment 1 Olivier Thomann CLA 2011-07-13 14:27:58 EDT
I think the way to fix this would be to use the Unicode6.xml data to generate the scanner tables and then using the Unicode 4 data to "update" the tables according to the original Unicode 4 specifications.
Comment 2 Olivier Thomann CLA 2011-07-13 14:36:02 EDT
I'll build a list of all characters that have changed for Unicode 4.0.
Comment 3 Olivier Thomann CLA 2011-07-18 11:03:38 EDT
Released in BETA_JAVA7 branch only.
Comment 4 Raksha Vasisht CLA 2011-07-20 06:08:18 EDT
Verified.