First check that your files are actually encoded in ISO-8859-1
, if so, your console may be set to UTF-8
or some other type of encoding.
You can change the console encoding by adding the -Dconsole.encoding
flag to idea.vmoptions
and idea64.vmoptions
files within [diretório de instalação do IDEA]\bin
.
For example, on my Windows machine with the 2016.2
version of IntelliJ IDEA installed in the default directory these files are in:
C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2\bin\idea.exe.vmoptions
C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2\bin\idea64.exe.vmoptions
Edit these files and add the line -Dconsole.encoding=ISO-8859-1
, eg.:
-server
-Xms128m
-Xmx512m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Dconsole.encoding=ISO-8859-1
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
Reference : SOen - Intellij Idea incorrect encoding in console output