Skip to content
Browse files

Fix to respect values of @input_encoding and @output_encoding

  • Loading branch information...
1 parent 415bd11 commit 25fdfb6fe2802ebb4183fdb996b1fa9c5749b803 @mocoso mocoso committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/csv_builder.rb
  2. +1 −1 lib/transliterating_filter.rb
View
2 lib/csv_builder.rb
@@ -41,7 +41,7 @@ def compile(template)
end
FasterCSV.generate do |faster_csv|
- csv = TransliteratingFilter.new(faster_csv)
+ csv = TransliteratingFilter.new(faster_csv, @input_encoding || 'UTF-8', @output_encoding || 'LATIN1')
#{template.source}
end
rescue Exception => e
View
2 lib/transliterating_filter.rb
@@ -1,7 +1,7 @@
class TransliteratingFilter
# Transliterate into the required encoding if necessary
# TODO: make defaults configurable
- def initialize(faster_csv, input_encoding = 'UTF-8', output_encoding = 'LATIN1')
+ def initialize(faster_csv, input_encoding, output_encoding)
@faster_csv = faster_csv
# TODO: do some checking to make sure iconv works correctly in

0 comments on commit 25fdfb6

Please sign in to comment.
Something went wrong with that request. Please try again.