Domanda

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)

È stato utile?

Soluzione

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

ف
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top