On Mac OS X 10.5 with Java 1.5, I have this code snippet.
public static void main(String[] args) {
String name = "Алексей";
System.out.println("name = " + name);
}
The output is:
name = ???????
I expected to see:
name = Алексей
How can I make this happen?
Thanks to all the helpful ideas.
It turns out the key to my problem was this sentence:
The IDE I’m using, IntelliJ IDEA was explicitly setting the file encoding to MacRoman. By changing the encoding for the project to UTF-8, the problem was solved without any code changes.