Skip to content

Instantly share code, notes, and snippets.

@anjesh
Created November 2, 2016 07:14
Show Gist options
  • Save anjesh/33c4df6dcc1f9cbad33af2f4979e89db to your computer and use it in GitHub Desktop.
Save anjesh/33c4df6dcc1f9cbad33af2f4979e89db to your computer and use it in GitHub Desktop.
charset encoding and converting using bash
#find the charset
file -I filename
#convert the given encoding to itf-8
iconv -f $(file -bI filename | sed -e "s/.*[ ]charset=//") -t utf-8 filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment