diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/export/pdf.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 3203c19a8..97176a7f9 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -408,6 +408,13 @@ module Redmine txt = Redmine::CodesetUtil.replace_invalid_utf8(txt) end txt.force_encoding('ASCII-8BIT') + elsif RUBY_PLATFORM == 'java' + begin + ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8') + txt = ic.iconv(txt) + rescue + txt = txt.gsub(%r{[^\r\n\t\x20-\x7e]}, '?') + end else ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8') txtar = "" |