I'm trying to use Unicode character Θ
(\u0398) in my java program, But when I print that character, I'm getting ?
.
System.getProperty("file.encoding")
is showing value Cp1252
on my machine. I have tried to change this property to UTF8
, But I'm still getting ?.
The sample code that I use in my test program is given below.
char[] CHAR_TABLE = { '@', '\u0398', '1', };
for(int i=0; i< CHAR_TABLE.length; i++) {
System.out.println(CHAR_TABLE[i]);
}
The output of this code is:
@
?
1
I was facing the same issue in another Java application (on another machine), but after service restart everything was fine.