Skip to content

Instantly share code, notes, and snippets.

@TheLarkInn
Created January 20, 2014 19:32
Show Gist options
  • Save TheLarkInn/8527422 to your computer and use it in GitHub Desktop.
Save TheLarkInn/8527422 to your computer and use it in GitHub Desktop.
convert all strings to utf8
hash.map{ |row|
row.keys.each{|key|
puts "data for #{key} has been converted to utf8"
row[key] = row[key].to_utf8 if row[key].class == String
}
row
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment