| Summary: | [1.7][compiler] Unicode 6.0 characters work at compiler compliance level 1.5 and 1.6 | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Deepak Azad <deepakazad> |
| Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jarthana, Olivier_Thomann |
| Version: | 3.7 | ||
| Target Milestone: | 3.7.1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
I tried with javac 1.7 b134 and it can compile this code fine. I don't see how \u11009 is a valid unicode. I am investigating. (In reply to comment #1) > I don't see how \u11009 is a valid unicode. http://www.unicode.org/charts/PDF/Unicode-6.0/U60-11000.pdf says that 11009 is a valid Unicode 6.0 character. > http://www.unicode.org/charts/PDF/Unicode-6.0/U60-11000.pdf says that 11009 is
> a valid Unicode 6.0 character.
Yes, but this is not the way to represent it.
I think it should be replaced with high and low surrogates: \ud804\udc09.
If you write\u11009, this is seen as \u1100 followed by 9. I don't think this is what you meant.
(In reply to comment #3) > > http://www.unicode.org/charts/PDF/Unicode-6.0/U60-11000.pdf says that 11009 is > > a valid Unicode 6.0 character. > Yes, but this is not the way to represent it. > I think it should be replaced with high and low surrogates: \ud804\udc09. Sorry, you are right :) Released in BETA_JAVA7 branch Verified. |
BETA_JAVA7 branch --------------------------------------------------------- package org.eclipse; class Unicode_17 { public static void main(String[] args) { String \u20B9 = "Rupee symbol"; //1 System.out.println(\u20B9); String \u11009 = "Brahmi"; //2 System.out.println(\u11009); } } -------------------------------------------------------- //1 (See http://www.unicode.org/charts/PDF/Unicode-6.0/U60-20A0.pdf) //2 (See http://www.unicode.org/charts/PDF/Unicode-6.0/U60-11000.pdf) - The above snippet works with BETA_JAVA7 branch and compiler compliance set to 1.5 or 1.6 (JRE used is 1.5 or 1.6). - The snippet gives a compiler error with 3.7M6 and compiler compliance set to 1.5 or 1.6 (again JRE used is 1.5 or 1.6). Even though both '1' and '2' are new Unicode 6.0 characters, there is a compile error only for '1', but no error for '2'.