'w') do |out| File.foreach(ARGV[0]).each do |line| # ༣ศ൪߸CSVSJISͳͷͰUTF-8ʹม line.encode!('UTF-8', 'Windows-31J') csv_arr = CSV.parse_line(line) # http://ja.wikipedia.org/wiki/%E8%A1%A8%E5%8F%82%E9%81%93_%28%E5%8E%9F%E5%AE%BF%29 if /ਆٶલ|[ೆ]੨ࢁ/ =~ csv_arr[8] out.write(line) end end end