PDF: use SJIS instead of CP932 at unit pdf test test_rdm_pdf_iconv_invalid_utf8_should_be_replaced_ja in JRuby (#8565, #61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6023 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8d620a1297
commit
2c803670d8
|
@ -95,7 +95,11 @@ class PdfTest < ActiveSupport::TestCase
|
||||||
str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding)
|
str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding)
|
||||||
str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding)
|
str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding)
|
||||||
if RUBY_VERSION < '1.9'
|
if RUBY_VERSION < '1.9'
|
||||||
ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8')
|
if RUBY_PLATFORM == 'java'
|
||||||
|
ic = Iconv.new("SJIS", 'UTF-8')
|
||||||
|
else
|
||||||
|
ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
txt_1 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str1)
|
txt_1 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str1)
|
||||||
txt_2 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str2)
|
txt_2 = Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, str2)
|
||||||
|
|
Loading…
Reference in New Issue