Created
March 25, 2014 18:21
-
-
Save Lytol/9767941 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'csv' | |
abort("You must specify a CSV file") unless ARGV.length == 1 | |
CSV do |out| | |
CSV.foreach(ARGV[0], encoding: 'ISO-8859-1') do |row| | |
out << row.map { |c| c.nil? ? nil : c.encode('UTF-8') } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment