From: Mark Toth Date: 2007-12-29T02:23:18+09:00 Subject: Re: FasterCSV and " char question I have now successefully imported the file with the following code: Thanks for your help! file = "filename.txt" @time_start = Time.now File.open(file) do |sFile| @PriceListFileEmpty = file.empty?() @PriceListFileLength = file.length() @PriceListFileSize = file.size() $KCODE = "utf8" while line = sFile.gets row = line.split("\t") next if row.empty? a_product = Product.new( :sku => row[0] , :name => row[1] , :price => row[2] , :category => row[5] , :manufacturer => row[6] , :manufacturersku => row[7] , :othersku => row[8] , :producturl => row[9] , :stockstatus => row[10] , :shipping => row[11]) a_product.save end end @time_end = Time.now -- Posted via http://www.ruby-forum.com/.