Skip to content

Instantly share code, notes, and snippets.

@hrickards
Created June 13, 2017 14:12
Show Gist options
  • Save hrickards/eea667f6c2fcf5acd17ff5fa4f82ad70 to your computer and use it in GitHub Desktop.
Save hrickards/eea667f6c2fcf5acd17ff5fa4f82ad70 to your computer and use it in GitHub Desktop.
Transcode UTF8 files with broken chars to WINDOWS-1252
#!/usr/bin/env bash
[ $# -ne 2 ] && { echo "Usage: $0 <input_file.csv> <output_file.csv>"; exit 1; }
iconv -f UTF-8//TRANSLIT//IGNORE -t WINDOWS-1252 $1 > $2.csv
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment