Question

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)

Was it helpful?

Solution

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

ف
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top