JDK-4083527 : Using non-ASCII Letter for Class name cuases StringIndexOutOfBoundsException
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1997-10-02
  • Updated: 1997-10-14
  • Resolved: 1997-10-14
Related Reports
Duplicate :  
Description
In the Java Language Specification, all the legal Unicode Letter could
be used for Java Class name.  In reality, this is not always true.
If you use non-ASCII letter for class name, it will result in an excepiton being thrown.

Please try the test case bugIdxxxxxxx.java (where xxxxxxx is the id number of this bug) under /home/cjao/openbugs/

Comments
EVALUATION I talked to the i18n, vm, and compiler folks. Here is the correct fix: - javac will generate .class files in the platform encoded file name - jar tool will convert these platform strings into utf8 strings in .jar files. - the vm will look for platform encoded strings when classloading from a directory and utf8 strings when loading from jar files. - the whole thing will be documented. This is the only way we are going to allow classnames with Unicode letters to work cross-platform (in the same locale) and cross locale. anand.palaniswamy@Eng 1997-10-12
12-10-1997