简体   繁体   中英

Can`t compile accent mark in my Maven Project - IntelliJ

Few days ago, I have been gotten problems when I use accent marks in my code.

Code:

System.out.println("Trámite");

aparece en la consola:

Tr$amite

I am using "$" because I don't find another way to paste the special character that appears.

Just to comment, I am using IntelliJ Idea to code.

Anyone have a configuration to fix this issue that I am facing?

Your problem is most likely related to the file encoding you are using. Try to change it to 'utf-8' and see if that solves your problem.

Here a blogpost with some pictures on where to find the proper setting. https://blog.jetbrains.com/idea/2013/03/use-the-utf-8-luke-file-encodings-in-intellij-idea/

Make sure you specified the UTF-8 encoding for project and for this file in Settings(Preferences) | Editor | File Encodings settings.

Also to make sure java compiler uses it you can add -encoding UTF-8 in Settings (Preferences on macOS) | Build, Execution, Deployment | Compiler | Java Compiler | Javac Options | Additional command line parameters .

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