Created
May 14, 2012 12:34
-
-
Save masaakif/2693702 to your computer and use it in GitHub Desktop.
カンマ区切りのファイルを読み込み、UTF16LEのタブ区切りに変える。最初のフィールドはスキップ、空のフィールドはN/Aにする。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'uconv' #ここ動かない | |
| File.open(ARGV[0]).each do |line| | |
| vals = line.gsub(/,,/,',N/A,').gsub(/,,/,',N/A,').split(',') | |
| puts Uconv.sjistou16(vals[1..-1].join("\t"))#ここも動かない | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment