masayoshi.okutsu@Eng 1997-01-14
java.lang.NumberFormatException displays garbage characters.
When valueOf() method's parameter is given in Japanese (2 byted code),
NumberFormatException outputs an unreadable message or "??.??" (on
Solaris).
To reproduce the problem, execute the following test program.
public class lang_17{
public static void main(String aa[]){
String s = "1.2" ;
String s2 = "ú.ú‚" ;
double d1 = 1.2d ;
try{
Double d = new Double(s).valueOf(s) ;
if(d.doubleValue() != d1)
System.out.println("*** NG ***") ;
Double d2 = new Double(s2).valueOf(s2) ;
if(d2.doubleValue() == d1)
System.out.println("*** NG ***") ;
}catch(Exception e){
System.out.println(e) ;
}
System.out.println("*** OK ***") ;
}
}