Skip to content

Instantly share code, notes, and snippets.

@AndreiCherniaev
Last active October 5, 2023 11:51
Show Gist options
  • Save AndreiCherniaev/9659b7163c4f7502397ad4bdc437fbb7 to your computer and use it in GitHub Desktop.
Save AndreiCherniaev/9659b7163c4f7502397ad4bdc437fbb7 to your computer and use it in GitHub Desktop.
CP1251 to UTF-8
# Устанавливаем https://github.com/nijel/enca
sudo apt-get install enca
# Заходим в папку с исходниками
cd ПутьКПапкеСИсходниками
# Запустим скрипт перевода всего, что в русских кодировках (russian: KOI8-R CP1251 ISO-8859-5 IBM866 maccyr) в UTF-8.
find ./ -name "*.c" -o -name "*.h" -type f | while read file; do enca -L ru -x UTF-8 "$file"; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment