J :
* 30sec tool to spot unsupported characters
This commit is contained in:
11
projects/mtg/bin/Res/lang/spot.rb
Normal file
11
projects/mtg/bin/Res/lang/spot.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/ruby -w
|
||||
|
||||
require 'iconv'
|
||||
c = Iconv.new('UTF-8', 'WINDOWS-1252')
|
||||
line = 0
|
||||
while l = gets
|
||||
line += 1
|
||||
if l.match(/[\x80-\xFF]/)
|
||||
puts line.to_s + " : " + c.iconv(l.gsub(/([\x80-\xFF])/, '[31m\\1[0m'))
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user