Skip to content

Instantly share code, notes, and snippets.

@yradunchev
Created August 17, 2017 16:57
Show Gist options
  • Select an option

  • Save yradunchev/d96b35eb7a6c47a29ee9d6dd27c5c3bf to your computer and use it in GitHub Desktop.

Select an option

Save yradunchev/d96b35eb7a6c47a29ee9d6dd27c5c3bf to your computer and use it in GitHub Desktop.
fix subtitles encoding and convert single й to ѝ
for f in *.srt; do iconv -f WINDOWS-1251 -t utf8 -o ${f}.u ${f} && mv ${f}.u ${f} && sed -i -E 's/(\b)й(\b)/\1ѝ\2/g' ${f}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment