Skip to content

Instantly share code, notes, and snippets.

@wallymathieu
Created February 9, 2011 18:29
Show Gist options
  • Save wallymathieu/818967 to your computer and use it in GitHub Desktop.
Save wallymathieu/818967 to your computer and use it in GitHub Desktop.
Simple script to convert greek windows-1253 subtitles to UTF-8
@ECHO OFF
ruby convert_greek_to_utf8.rb "%~dpn0" %*
pause
# 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