Przykład

public static void main( String[] args) {
char ch = '\u4e2d';
System.out.println(Character.toUpperCase(ch));
}
Rozwiązanie
Użyj następującej metody J2SE 1.5.0:
java.lang.Character.toUpperCase (int)

public static void main( String[] args) {
int c1 = 0x10428;
int c2 = Character.toUpperCase(c1);

System.out.println(Integer.toHexString(c2));
}
Rozwiązanie
Użyj klasy ICU 2.6.1com.ibm.icu.lang.UCharacter z następującą metodą
  • com.ibm.icu.lang.UCharacter.toUpperCase (int)

public static void main( String[] args) {
int c1 = 0x10428;
int c2 = com.ibm.icu.lang.UCharacter.toUpperCase(c1);
System.out.println(Integer.toHexString(c2));
}