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