diff --git a/csv2table.rb b/csv2table.rb index 5196e24..c8aebde 100755 --- a/csv2table.rb +++ b/csv2table.rb @@ -3,7 +3,7 @@ # CSV to table(HTML) converter - csv2table.rb # (c)2000, 2007, 2017 by HIROSE, Yuuji # $Id$ -# Last Modified Sat Nov 4 18:22:31 2017 on firestorm +# Last Modified Tue Nov 7 13:57:02 2017 on firestorm =begin @@ -215,13 +215,14 @@ count = 0 print "\n" # ����ܤϸ��Ф� +csvopt = $tabdelim ? {:col_sep => "\t"} : {} case ARGV[0] when /\.ods/i require 'roo' - data = CSV.parse(Roo::OpenOffice.new(ARGV[0]).to_csv.toeuc) + data = CSV.parse(Roo::OpenOffice.new(ARGV[0]).to_csv.toeuc, csvopt) else - data = CSV.parse(ARGF.read.toeuc) + data = CSV.parse(ARGF.read.toeuc, csvopt) end th = nil