diff options
Diffstat (limited to 'lib/redmine/export/csv.rb')
-rw-r--r-- | lib/redmine/export/csv.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/export/csv.rb b/lib/redmine/export/csv.rb index dfbe36f4f..b0d48ef6f 100644 --- a/lib/redmine/export/csv.rb +++ b/lib/redmine/export/csv.rb @@ -31,12 +31,12 @@ module Redmine class << self - def generate(&block) + def generate(options = {}, &block) col_sep = l(:general_csv_separator) - encoding = l(:general_csv_encoding) + encoding = Encoding.find(options[:encoding]) rescue Encoding.find(l(:general_csv_encoding)) str = ''.force_encoding(encoding) - if encoding == 'UTF-8' + if encoding == Encoding::UTF_8 # BOM str = "\xEF\xBB\xBF".force_encoding(encoding) end |