Created
August 13, 2014 14:04
-
-
Save aripalo/8e7d8239b56a4a6a3ebc to your computer and use it in GitHub Desktop.
Converting HTML with UTF-8 encoding to ISO-8859-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open("output.html", 'w') { |file| file.write(File.read(ARGV[0]).encode(Encoding::ISO_8859_1)) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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