Skip to content

Instantly share code, notes, and snippets.

@Lytol Lytol/parse
Created Mar 25, 2014

What would you like to do?
#!/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 << { |c| c.nil? ? nil : c.encode('UTF-8') }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.