2 # -*- coding: utf-8 -*-
4 # The following script converts Unicode codepoints as 0x???? to real characters.
6 # USAGE: ruby __FILE__ ifile [> ofile]
9 print "USAGE: ruby ", __FILE__, "ifile [> ofile]\n"
20 print "-- -*- coding: utf-8 -*-\n"
21 open(ifile, "r").each_line{|line|
22 line.gsub!(/0x[0-9a-fA-F]*/){|s| s.to_s + "(" + [s.to_i(0)].pack("U*") + ")"}