Category:

Replace encoding in Linux / Ubuntu text files

Former_Ubuntu_logo.svg

Recently faced with the opening of the files containing the Cyrillic alphabet. The files were copied from FreeBSD (KOI8-R encoded). It was necessary to open under Ubuntu with UTF-8. There are two ways to solve the problem.

1. Installing an additional package from the repository:

sudo apt-get install recode

For conversion, run in the console:

recode koi8-r..utf-8 filename

2. Conversion using Gedit editor. For installation:

sudo apt-get install gedit

To open a file with the required encoding, use the command:

gedit --encoding koi8-r filename


Posted: 2016-02-29

Comments