darwin / csv2json

A gem useful for converting CSV files to JSON from command-line
MIT License
167 stars 39 forks source link

invalid byte sequence in UTF-8 #7

Closed dmowcomber closed 4 years ago

dmowcomber commented 11 years ago

I was getting an encoding error with a certain csv file "invalid byte sequence in UTF-8". Adding ":ISO-8859-1" when opening the file fixed my problem

if ARGV.size > 0
    IN = File.open(ARGV[0], "r:ISO-8859-1")