Frage

I want to use Persian characters to show user the letters in Persian; but I just have received question mark instead of Persian characters. How can I use these characters in Java console? (I use eclipse-Kepler)

War es hilfreich?

Lösung

If you mean the eclipse console it should by default support UTF8 (mine does). If it doesn't here is a link with pictures describing how to change console output encoding. Works fine with the arabic letter phe:

String s = "\u0641";
System.out.println(s);

Out

ف
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top