Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having problems with subtitles in my language. They are encoded as Western(ISO-8859-15) and therefore some characters are not displayed correctly. I am tired of replacing manually using gedit and ctrl-h and then saving as UTF-8. How to automate this process?

share|improve this question
The process using iconv will most likely work flawlessly if you are not using characters outside the English latin set. If you encounter any problems, check this answer: – carnendil Oct 22 '13 at 18:10
up vote 5 down vote accepted

You can use iconv:

If the file is named, then run:

iconv -f iso88591 -t utf8 >

and it will create the file, although it'll have a different name. If you move them out into another directory, then you can easily pipe them back in.

share|improve this answer
Thank you, it works. – Primož Kralj Oct 25 '12 at 20:42

Another option is

konwert Install konwert

konwert isolatin1-utf8 >

Besides conversion, konwert can also be used as an encoding detector:

konwert any/en-test

Which is great to get the input file encoding needed for the conversion, since both konwert and iconv requires that as argument. You must however provide a language parameter: en in any/en-test means English

It also has an option for in-place conversion, so you don't have to move and rename files afterwards:

konwert isolatin1-utf8 -O
share|improve this answer

Also, since you're dealing with .srt files, you should really check pysrt. It has many features to manipulate subtitles, like shifting and rescaling times.


sudo pip install pysrt

Converting to UTF-8 (it auto-detects input file encoding using either chardet or charade)

srt -i --encoding 'utf-8' shift 0s
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.