Skip to content

Instantly share code, notes, and snippets.

@aripalo
Created August 13, 2014 14:04
Show Gist options
  • Save aripalo/8e7d8239b56a4a6a3ebc to your computer and use it in GitHub Desktop.
Save aripalo/8e7d8239b56a4a6a3ebc to your computer and use it in GitHub Desktop.
Converting HTML with UTF-8 encoding to ISO-8859-1
File.open("output.html", 'w') { |file| file.write(File.read(ARGV[0]).encode(Encoding::ISO_8859_1)) }
#!/usr/bin/env bash
ruby convert.rb /path/to/source.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment