简体   繁体   中英

IntelliJ IDEA 2018.3.5 - UTF-8 encoding error on console despite setting the encoding type

As the title clearly describes, some UTF-8 characters such as ( ğ , ç , ş , etc.) could not be displayed on the console output despite (1) setting all the encoding preferences available in the Settings UI to UTF-8 , and (2) adding the -Dfile.encoding=UTF-8 parameter to the idea64.exe.vmoptions file as it is provided in another question in Stack Overflow .

IntelliJ IDEA Version: 2018.3.5 (Ultimate Edition)

Edit: I am running my web app in debug mode, and using Apache Tomcat as the servlet container. So, the console output is the log of the web app.

正如@Andrey 所说,如果您想在运行/调试控制台中看到这些符号,您应该将-Dfile.encoding=UTF-8 VM 选项添加到您的运行/调试配置中,而不是添加到 IDE 选项中。

183.5153.38 version is an example.

Your IntelliJ IDEA Ultimate runs AppData \\ Local \\ JetBrains \\ Toolbox \\ apps \\ IDEA-U \\ ch-0 \\ 183.5153.38 \\ bin \\ idea.exe.

  • In the 183.5153.38.vmoptions file, add 'Dfile.encoding = UTF-8'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM