← All features

File encodings

Reopen a file in the encoding it is really in, or save it in another one: Shift_JIS, GBK, windows-1251 and every other encoding the JDK knows. The choice is remembered per file.

Editora reads a file as UTF-8 unless a byte-order mark or the project’s .editorconfig says otherwise. A file that is not valid UTF-8 opens through a single-byte stand-in (Windows-1252 or ISO-8859-1) that keeps every byte, and its encoding in the status bar is drawn in the warning colour, because it is a guess.

Click the encoding in the status bar, or use the palette:

The list starts with the common encodings grouped by script (Unicode, Western, Central European, Cyrillic, Greek, Turkish, Hebrew, Arabic, Baltic, Vietnamese, Thai, Japanese, Chinese, Korean, DOS) and goes on with every other encoding the runtime supports, the same on every operating system.

The choice is remembered for the file: it is used when the file opens again, after a restart, and after a rename, and it works for files on a remote host, where .editorconfig is not read. File Information shows the encoding in use.

A shell script that opens with Windows (CRLF) line endings or a byte-order mark gets a notice above the editor with Convert to LF (or Remove BOM), since bash cannot run it as it is. Saving writes the fix.