Encoding plugin¶
A Notepad++-style Encoding menu for re-reading a file in a different character encoding, or converting it to one. The editor works in UTF-8 internally; this plugin decides how a file's bytes map to and from that.
Two kinds of command¶
The distinction matters — one changes interpretation, the other changes the file:
| Family | Menu | What it does |
|---|---|---|
| Interpret as | Encoding ▸ <encoding> and Encoding ▸ Character sets ▸ <set> |
Re-reads the file's bytes from disk and decodes them with the chosen encoding, replacing the buffer. Use it when a file opened as mojibake. The file on disk is untouched until you save. |
| Convert to | Encoding ▸ Convert to <encoding> |
Transcodes the current buffer to the chosen encoding and writes it back to the file, adding a byte-order mark (BOM) where appropriate. |
Available encodings¶
- Unicode: UTF-8, UTF-8-BOM, UTF-16 LE BOM, UTF-16 BE BOM.
- ANSI — the system's local single-byte code page.
- Character sets submenu — 16 legacy single-byte sets: Arabic, Baltic, Central European, Cyrillic, Greek, Hebrew, Thai, Turkish, Vietnamese, Western, and others.
The plugin remembers each open document's encoding, so a later Convert to or Interpret as knows where the file currently stands.
Fixing a garbled file
If a file opens as gibberish, try Interpret as with the encoding you expect (e.g. a legacy character set). When it reads correctly, Convert to UTF-8 to save it in a modern, portable encoding.