0

Every time when I download a subtitle with special characters like ă,ș and ț (Romanian special characters) my system convert the characters in ã,º and þ. If I try to replace the characters in gedit I receive this error:

Could not save the file using the “Western (ISO-8859-15)” character encoding.
The document contains one or more characters that cannot be encoded using the specified character encoding.
Select a different character encoding from the menu and try again.
Character Encoding Current Locate UTF-8

I don't want to convert every file I'll download, I want to read my text files properly by default. I solved this problem a few years ago but after a fresh install, I can't remember what I did. I have Ubuntu 18.04.1

1 Answer 1

0

I have no universal solution for that, but it is in particular for subtitles that I always have the light weight text editor leafpad installed. leafpad is extremely good to recognize the code page of a text file, and usually opens it correctly. Ctrl+s then allows to "save as": in the dialog, leave the file name, but change the encoding to UTF-8.

There is a terminal command iconv that allows to change character codes as well. However, you need to know the current character code yourself before doing the conversion. You can obtain that with the command file -b --mime-encoding <yourfile>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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