Reputation: 6785
I am using intelliJ 2017.3 CE, I have a strange behaviour which i cannot resolve although I tried everything I found to that topic.
For simplicity I extracted the root cause of my problem, IntelliJ does not use the desired encoding in my case UTF-8. Here is my simple class:
public static void main(String[] args) {
System.out.println("äüö");
}
running this class leads to the following output:
13:03:47: Executing task 'StringTest2.main()'...
:core:compileJava UP-TO-DATE
:core:processResources UP-TO-DATE
:core:classes UP-TO-DATE
:core:compileTestJava
:core:processTestResources UP-TO-DATE
:core:testClasses
:core:StringTest2.main()
äüö
BUILD SUCCESSFUL in 2s
5 actionable tasks: 2 executed, 3 up-to-date
13:03:49: Task execution finished 'StringTest2.main()'.
Here you can see the encoding of the file
here are the settings of my intellij installation
What I tried:
I dont know what else I can try.
Upvotes: 0
Views: 1237
Reputation: 109613
The console still uses the platform encoding.
Use
-Dconsole.encoding=UTF-8
Upvotes: 1