Created
July 3, 2015 09:57
-
-
Save ptantiku/26ea74190a4c8390037c to your computer and use it in GitHub Desktop.
Convert input.txt to all encoding available in iconv
This file contains hidden or 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 ruby | |
list=`iconv -l`.gsub(/[ \n]/,'').split('//') | |
list.each do |encode| | |
out = `iconv input.txt -f #{encode} -c -t UTF-8` | |
puts "#{encode}\t#{out}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment