Subtitle encoding explained
Weird characters in subtitles almost always mean the file was saved in one encoding and read in another. Save it as UTF-8, which current players, TVs and media servers read, and the letters come out right in any language.
The short version
A subtitle file is text stored as bytes, and the encoding is the table that turns those bytes back into letters. The same bytes give different letters under different tables. When the player uses another table than the one the file was saved with, é turns into é, Russian turns into Ïðèâåò, and Arabic into a row of Latin accents.
The cure is to save the file as UTF-8, which has one code for every letter of every script and which current players read without being told. The encoding fixer finds the table a file was really saved with and saves it again as UTF-8.
What an encoding is, byte by byte
Take the French word café. The first three letters are plain English letters, stored as one byte each in every common encoding. The é is where encodings disagree:
| Saved as | Bytes for é |
Read as Windows-1252 | Read as UTF-8 |
|---|---|---|---|
| UTF-8 | C3 A9 |
café |
café |
| Windows-1252 | E9 |
café |
caf� |
UTF-8 uses two bytes for é. A player that reads them with the Western table, Windows-1252, sees two letters, Ã and ©. The other way round, a lone E9 is not a valid letter in UTF-8, so the player shows the replacement mark �.
Every script has its own trap. In Windows-1251, the Russian code page, the byte CF is П; in Windows-1252 the same byte is Ï. So a Russian file saved on an older Russian computer and read as Western text starts Ïðèâåò instead of Привет.
ANSI, code pages and UTF-8
Before UTF-8 was everywhere, each region had its own table of 256 characters, called a code page. Windows calls the code page of the computer "ANSI", so "ANSI" means Windows-1252 on an American computer and Windows-1251 on a Russian one. Old subtitle files from download sites were saved this way, and many still are.
| Language | Common old encodings |
|---|---|
| English, French, German, Spanish, Portuguese, Italian, Dutch, Scandinavian | Windows-1252, ISO-8859-1, ISO-8859-15 |
| Polish, Czech, Slovak, Hungarian, Croatian, Slovenian, Serbian in Latin letters | Windows-1250, ISO-8859-2 |
| Romanian | Windows-1250, ISO-8859-16 |
| Russian, Ukrainian, Bulgarian, Serbian in Cyrillic | Windows-1251, KOI8-R, KOI8-U |
| Greek | Windows-1253, ISO-8859-7 |
| Turkish | Windows-1254, ISO-8859-9 |
| Hebrew | Windows-1255, ISO-8859-8 |
| Arabic, Persian | Windows-1256, ISO-8859-6 |
| Lithuanian, Latvian, Estonian | Windows-1257, ISO-8859-13 |
| Vietnamese | Windows-1258 |
| Thai | Windows-874, which extends TIS-620 |
| Japanese | Shift_JIS, EUC-JP |
| Chinese, simplified | GBK, GB18030 |
| Chinese, traditional | Big5 |
| Korean | EUC-KR, or Windows code page 949, which extends it |
A file in one of these can only hold the letters of its table. That is why a Greek code page file cannot also hold Russian, and why saving a file as "ANSI" on the wrong computer turns letters into question marks. UTF-8 has none of these limits, which is why it is the encoding to save subtitles in.
What the weird characters tell you
The kind of garbage tells you what happened, and whether the text can come back:
| What you see | What happened | Can it be fixed? |
|---|---|---|
é, è, ’, п |
A UTF-8 file read with a Western code page | Yes |
Ïðèâåò, ÊáëçìÝñá, ãÑÍÈÇ, Þ and ð in Turkish |
A regional code page file read as Western text | Yes |
� in place of each accented letter, only in the player |
A code page file read as UTF-8 | Yes, if the file itself is still intact |
� or ? saved in the file itself |
A program replaced letters it could not read or store | No: the letters are gone from that copy |
| Empty boxes, with the right number of them | The encoding is right, but the player's font has no shapes for that script | No change to the file needed: choose another subtitle font in the player |
 before the first line |
A UTF-8 byte order mark read as Western text | Yes |
Garbled text can also be saved into a file: someone opened it with the wrong table, saw é, and saved it as UTF-8. Now the garbage is in the file itself, and changing the player's setting no longer helps. That damage can usually be undone too. The fixer recognizes the common patterns and shows each line before and after:
7
00:00:21,000 --> 00:00:23,500
Привет, как дела?
7
00:00:21,000 --> 00:00:23,500
Привет, как дела?
The BOM, and why some TVs need it
A byte order mark (BOM) is three bytes, EF BB BF, at the very start of a file. They are invisible in a player and say "this file is UTF-8". Current players and media servers recognize UTF-8 without them. Some older TVs and media boxes do not: they show garbled letters in a correct UTF-8 file unless the BOM is there.
So save without a BOM by default, and if a TV still garbles a UTF-8 file, save it again with one. The download options on this site include "UTF-8 with BOM (older TVs)" for this.
Player settings or a fixed file
Most players have a setting for the encoding of subtitles they cannot identify:
- VLC: Tools, Preferences, Subtitles / OSD, Default encoding. VLC recognizes UTF-8 and files with a byte order mark on its own; for other files it falls back on an encoding that depends on the language of its menus, so an English VLC reads a Russian or Arabic file in an old code page as Western text. Restart VLC after changing it.
- mpv: the
--sub-codepageoption, such as--sub-codepage=cp1256for Arabic. - Kodi: Settings, Player, Subtitles, Character set (under Language in Kodi 19 and earlier).
- Plex: asks for UTF-8 subtitle files in its own help pages, and warns that other encodings can show unexpected characters. Plex subtitles not showing covers the rest of what Plex needs.
A setting helps in one player, on one device, and only for files in that one encoding: set VLC to Arabic and your French files break instead. A file saved as UTF-8 works in all of them, and on phones and TVs that have no such setting.
How to convert a file to UTF-8
- Open the file in the encoding fixer. It works out the encoding from the bytes themselves; a language code at the end of the file name, as in
film.ru.srt, counts as a hint. - Check that the text reads right. If the tool is unsure, it shows a preview for each likely encoding, and you pick the one you can read.
- Download. The file is saved as UTF-8 under your file name, with a BOM if you choose one.
You can also do it in Notepad on Windows: open the file, then Save as, and choose UTF-8 under Encoding. This only works when Notepad showed the letters correctly before you saved. If it showed garbage, Save as stores that garbage as UTF-8, and the original letters are no longer in the new file.
Frequently asked questions
What is the best encoding for subtitles?
UTF-8. It holds every language, current players, browsers, phones and media servers read it, and it is the encoding Plex and YouTube ask for. Add a BOM only for a TV that needs one.
Is ANSI the same as UTF-8?
No. "ANSI" is Windows' name for the regional code page of the computer that saved the file, such as Windows-1252 in Western Europe and the Americas. A file saved as ANSI on one computer can look wrong on another; UTF-8 looks the same everywhere.
Why do my subtitles show question marks?
If the question marks are in the file itself, a program replaced letters it could not store, often by saving as ANSI, and they cannot be recovered from that copy. Find the original file. If the file looks right in a text editor and only the player shows ? or �, the player is reading it with the wrong encoding, and converting the file to UTF-8 fixes it.
Why are Arabic subtitles showing weird characters?
Most Arabic subtitle files on download sites are in Windows-1256, and a player that reads them as Western text shows Latin letters with accents, such as ãÑÍÈÇ. Converted to UTF-8, they show Arabic. If the letters are right but in the wrong order, the problem is the player's right-to-left support, not the encoding.
Can I fix the encoding without changing the text?
Yes. Converting from the right code page to UTF-8 changes the bytes, not the letters: every letter you see stays the same. Only text that was garbled into the file itself is changed, and the fixer shows those lines before and after so you can check them.