JDK-4277355 : Compilation problem with the unicode on win32
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.3.0
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-10-01
  • Updated: 1999-10-12
  • Resolved: 1999-10-12
Related Reports
Relates :  
Relates :  
Description
A problem occurs when compiling the file has a UTF-8 encoded string on win32.
The string name is used as a class name, and it's contained the encoded string
except a standard 7-bit ASCII set and Japanese character set in Japanese environment.

The problem can be reproduced by the following test case.
---------------------------------------------
class Test {
    public static void main(String args[]) {
    }
}

class Test_\u00e9 {
}

class Test_\u3042 {
}
---------------------------------------------

The class "Test_\u3042" is OK, but "Test_\u00e9" is NG.
A javac recognizes "Test_\u00e9" as "Test_?", so the compile error occurs.

kenichi.kurosaki@Japan 1999-10-01

Comments
EVALUATION It is not clear from the bug report what the problem is. It is also unclear whether the unicode escape sequences in the bug report are meant to appear literally in the source, or whether they are there simply to express the contents of the supposedly UTF-8 encoded file. Please attach the test program as a bit-for-bit binary copy of the example you used, and provide the command used to invoke the compiler and the output it produced. I do not have access to a Japanese-localized version of Win32, so I need to proceed deductively from as much information as possible. william.maddox@Eng 1999-10-11 [xueming.shen@Eng 1999-10-12] The problem here is that you are not able to map \u009e into any legal code point in 932 codepage, same as \u3042 in codepage 1252, the "?" will be used to substitute these kind of "illegal" code points (by default), obviously Win32 platform has problem to open a file which "?" as part of its file name, meanwhile Solaris could open the file without problem. But even you have successfully created the class file on Solaris , you will still have problem later to access it... basically, you are not supposed to compile a java class which has illegal characters (in the locale the compiling is performing) as part of its class name. Close this one as not a bug.
11-06-2004

PUBLIC COMMENTS This is a reproducible in build "I" and before. kenichi.kurosaki@Japan 1999-10-01
01-10-1999