Problem with Character.getNumericValue
807600Jul 6 2007 — edited Jul 6 2007String name = "bobboli -_()あ!.。県きkk";
(inside a for loop)
int codePoint = name.codePointAt(i);
System.out.print(name.codePointAt(i) + " " + name.charAt(i));
Returns: A bunch of code point numbers and the characters of what cmd.exe can display (cmd doesn't display unicode, but that is another issue)
char bill = 'あ';
System.out.println(" " + Character.getNumericValue(bill));
System.out.println(" " + Character.getNumericValue('a'));
System.out.println(" " + Character.getNumericValue('.'));
Returns:
-1
10
-1
Where from the first bit of code, I know that あ (japanese 'a') is 12354, but I don't understand why I am getting -1 when trying to get the NumericValue as well as -1 for '.'
Encoding is utf-8 for the file, and I run javac -encoding utf-8 on the java file