سؤال

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)

هل كانت مفيدة؟

المحلول

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

ف
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top