0

I have added a java class file with encoding "ISO-8859-1" to an existing project:

public class TestClass {
    public static void main(String[] arg){
        String var = "è";
        System.out.println(var);
    }
}

enter image description here

after running the console shows:

?

I expected to see

è

in the console.

enter image description here

To find out the error I created a complete new Project and added a new class with encoding "ISO-8859-1" and the console returns:

è

enter image description here

My settings about encoding is also the same in both projects:

enter image description here

Where to set the correct encoding so my existing project returns the correct character?

mcfly soft
  • 11,289
  • 26
  • 98
  • 202
  • 1
    Try setting project encoding to the the same as the file encoding. But the better approach would be to use UTF-8 everywhere. – CrazyCoder Dec 01 '20 at 18:30
  • As mentoined. The Settings are the same in both projects. The screenshot looks the same for both projects. – mcfly soft Dec 01 '20 at 19:07
  • File a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with the [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) attached so that we can reproduce and fix it. – CrazyCoder Dec 01 '20 at 19:09
  • It must be something with compiler? When converting the class to kotlin, then the console shows that special french character. – mcfly soft Dec 01 '20 at 19:19
  • 1
    [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) would be appreciated. Thank you! – CrazyCoder Dec 01 '20 at 21:04

0 Answers0