Skip to content

Instantly share code, notes, and snippets.

@chapuzzo
Forked from beastaugh/iso-8859-15_to_utf-8.rb
Created March 6, 2014 19:41
Show Gist options
  • Save chapuzzo/9397774 to your computer and use it in GitHub Desktop.
Save chapuzzo/9397774 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
file = ARGV.shift
contents = File.read(file, {:encoding => "ISO-8859-15", :mode => "rb"})
contents.encode!("UTF-8")
File.open(file, 'w') do |f|
f.write(contents)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment