How to add Cyrillic in Ubuntu 18.04?
Usually text files with Russian (Cyrillic) text are created in Windows with Windows-1251 (or CP-1251) encoding. Less often they use ISO 8859-5. While modern systems use UTF-8.
You can always check file encoding with file
command:
$ file utf8.txt
utf8.txt: UTF-8 Unicode text
To open files correctly and automatically you can use feature-rich text editor as kate
.
Or specify encoding manually when you open file with gedit
or other editor.
Related videos on Youtube
Eric Korolev
Updated on September 18, 2022Comments
-
Eric Korolev over 1 year
I have already installed Russian keyboard layout.
In language support -> installed languages I already have Russian.
But when I open text file with Cyrillic I have encoding problems. This files was created in Windows earlier. With new files I don't have this problem.
Ïðîäâèíóòàÿ ìàìà
Ìàìà ñòðàòåã ñåìåéíûé íàø Åùå óñòðîèò íàì øàáàø Ìû ñ íåé íå óìðåì îò ñêóêè, Çà ýòî öåëóåì åé ðóêè.
UPD. I tried to specify Windows-1251 encoding manually while opening file and Cyrillic has shown correct. I don't have problem in files, which encoding was set as UTF-8.
-
N0rbert over 5 yearsDid you tried to specify Windows-1251 encoding manually while opening file with Gedit? Did you try Kate editor?
-
Eric Korolev over 5 years@N0rbert I tried and Cyrillic has shown correct.
-
David Foerster over 5 yearsPossible duplicate of Opening a non-utf8 encoded text file
-
-
Haggra over 3 years
file
command may be showing the incorrect format. My files were shown as ISO-8859, although they were Windows-1251. That was the core of the problem, as well. You can useiconv
command to convert the file formats.iconv -f Windows-1251 -t UTF-8 file_name
worked in my case.