lib/cnccs/ccs.rb in cnccs-0.1.2 vs lib/cnccs/ccs.rb in cnccs-0.1.3

- old
+ new

@@ -77,10 +77,10 @@ # Read data from file. # @param level [Integer] # @param match [String] # @return [Array<String, Array>] def fetch_data(level, match) - csv = CSV.read "#{__dir__}/../../cn-ccs-codes/cat-level#{level}.csv", headers: true + csv = CSV.read "#{__dir__}/../../cn-ccs-codes/cat-level#{level}.csv", "rb:UTF-8", headers: true row = csv.find { |r| r[0] == match } row.map(&:last) end # Fetch notes.