Created
February 9, 2011 18:29
-
-
Save wallymathieu/818967 to your computer and use it in GitHub Desktop.
Simple script to convert greek windows-1253 subtitles to UTF-8
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
@ECHO OFF | |
ruby convert_greek_to_utf8.rb "%~dpn0" %* | |
pause |
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
# called by having a cmd file convert_greek_to_utf8.cmd | |
require 'iconv' | |
txt = File.open(ARGV[1]).read | |
puts Encoding.list | |
puts Encoding.aliases | |
txtconv = Iconv.conv("UTF-8","Windows-1253",txt) | |
File.open(ARGV[1]+".2.srt", 'w') do |f| | |
f.puts txtconv | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment