From d15de8ee121db97138d2b38562d1c1371f72426e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Jun 2011 23:53:42 +0000 Subject: [PATCH] Merged r6013 from trunk. PDF: use SJIS instead of CP932 at unit pdf test_fix_text_encoding_nil in JRuby. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@6017 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/export/pdf_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/unit/lib/redmine/export/pdf_test.rb b/test/unit/lib/redmine/export/pdf_test.rb index 5c74f1aa2..3c2c87ed9 100644 --- a/test/unit/lib/redmine/export/pdf_test.rb +++ b/test/unit/lib/redmine/export/pdf_test.rb @@ -24,8 +24,12 @@ class PdfTest < ActiveSupport::TestCase def test_fix_text_encoding_nil set_language_if_valid 'ja' assert_equal 'CP932', l(:general_pdf_encoding) - if RUBY_VERSION < '1.9' - ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') + if RUBY_VERSION < '1.9' + if RUBY_PLATFORM == 'java' + ic = Iconv.new("SJIS", 'UTF-8') + else + ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') + end end assert_equal '', Redmine::Export::PDF::RDMPdfEncoding::rdm_pdf_iconv(ic, nil) end -- 2.39.5