lib/efo_nelfo/reader/csv.rb in efo_nelfo-1.2.0 vs lib/efo_nelfo/reader/csv.rb in efo_nelfo-1.3.0

- old
+ new

@@ -2,10 +2,12 @@ module EfoNelfo module Reader class CSV + ENCODING = Encoding::ISO_8859_1 + CSV_OPTIONS = { col_sep: ';', headers: false, row_sep: "\r\n", quote_char: "\x00", @@ -15,10 +17,10 @@ attr_reader :csv, :data def initialize(options) if options[:filename] - @data = File.read(options[:filename], encoding: Encoding::ISO_8859_1) + @data = File.read(options[:filename], encoding: ENCODING) else @data = options[:data] end @csv = ::CSV.new @data, CSV_OPTIONS