Skip to content

Instantly share code, notes, and snippets.

@redbaty
Created September 12, 2022 18:19
Show Gist options
  • Save redbaty/ecc4126b9a51bb6fa7ad97222043af08 to your computer and use it in GitHub Desktop.
Save redbaty/ecc4126b9a51bb6fa7ad97222043af08 to your computer and use it in GitHub Desktop.
Convert all *.cs files from WINDOWS-1252 to UTF-8
find . -type f -name "*.cs" | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" | xargs -I {} bash -c "iconv -f WINDOWS-1252 -t UTF-8 {} -o {}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment