@@ -95,8 +95,12 class PdfTest < ActiveSupport::TestCase | |||||
95 | str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) |
|
95 | str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) | |
96 | str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) |
|
96 | str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) | |
97 | if RUBY_VERSION < '1.9' |
|
97 | if RUBY_VERSION < '1.9' | |
|
98 | if RUBY_PLATFORM == 'java' | |||
|
99 | ic = Iconv.new("SJIS", 'UTF-8') | |||
|
100 | else | |||
98 | ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') |
|
101 | ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') | |
99 | end |
|
102 | end | |
|
103 | end | |||
100 | txt_1 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str1) |
|
104 | txt_1 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str1) | |
101 | txt_2 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str2) |
|
105 | txt_2 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str2) | |
102 | if txt_1.respond_to?(:force_encoding) |
|
106 | if txt_1.respond_to?(:force_encoding) |
General Comments 0
You need to be logged in to leave comments.
Login now