Skip to content

Instantly share code, notes, and snippets.

@fabiolimace
Created December 2, 2020 21:38
Show Gist options
  • Save fabiolimace/46f633453047f9d41125cb1384f19330 to your computer and use it in GitHub Desktop.
Save fabiolimace/46f633453047f9d41125cb1384f19330 to your computer and use it in GitHub Desktop.
File encoding examples
# Check file encoding
file -i INPUT_FILE.TXT
INPUT_FILE.TXT: text/plain; charset=utf-8
# Convert from UTF-8 to ISO-8859-1 with transliteration and ignoring invalid characters
iconv -f utf-8 -t iso-8859-1//TRANSLIT -c -o OUTPUT_FILE.TXT INPUT_FILE.TXT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment