IntelliJ IDEA 2017.1 Help

File Encodings

File | Settings | Editor | File Encodings for Windows and Linux
IntelliJ IDEA | Preferences | Editor | File Encodings for macOS

Use this dialog to configure encoding options for a project and for the entire IDE.

The file or directory encodings take precedence over the project encoding, which, in turn, takes precedence over the IDE encoding.

If the file or directory encodings are not defined, then the project encoding is taken. If the project encoding cannot be taken (for example, if a project is not yet created), then the IDE encoding is taken.

IDE EncodingFrom this drop-down list, choose the encoding to be used when no project is currently opened. The encoding will be applied, for example, when you specify settings of a default project or check out sources from a version control storage. Choose System Default to have the default encoding of your operating system used or choose a specific encoding.
Project EncodingFrom this drop-down box, choose the default encoding to use in the folders for which no encoding is appointed in the Default encoding field below. Choose System Default to have the default encoding of your operating system used or choose a specific encoding.
File/DirectoryThis column displays the project tree view.
Default encodingThis column displays encoding for a file or directory, if applicable. If encoding is defined within a file, it cannot be configured, and is shown in grey font. If encoding is configurable, click the Default Encoding column for a selected file or directory, and choose encoding from the drop-down list.

Encoding information embedded in a file overrides the selected one; encoding information for the nested files or directories overrides that for the outer directories or the whole project.

Default encoding for properties filesUse this drop-down list to define encoding for the properties files in the project. According to the Java API, the load(InputStream) / store(OutputStream, String) methods of the java.util.Properties class, use ISO 8859-1 encoding for input/output stream. It is advisable to use this encoding unless you have special reasons to change it. In this case, you can select the desired encoding from the drop-down list; in particular, you can use encoding defined for the whole project.
Transparent native-to-ascii conversionSelect this option to show in properties files the national characters (non-ISO 8859-1), stored as escape sequences.

For more details refer toConfiguring Encoding for Properties Files.

If this check box is not selected, the national characters will not be shown.

Compare two representations of the national characters:


See Also

Last modified: 18 July 2017