]> source.dussan.org Git - redmine.git/commitdiff
PDF: use SJIS instead of CP932 at unit pdf test test_rdm_pdf_iconv_cannot_convert_ja_...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jun 2011 01:56:21 +0000 (01:56 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jun 2011 01:56:21 +0000 (01:56 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6022 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/export/pdf_test.rb

index 3c2c87ed93e43423fb8bbe78fefa620169497a73..59cae2092bce72bea06f1005cb82df3a1fd9efd5 100644 (file)
@@ -38,7 +38,11 @@ class PdfTest < ActiveSupport::TestCase
     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_PLATFORM == 'java'
+        ic = Iconv.new("SJIS", 'UTF-8')
+      else
+        ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8')
+      end
     end
     utf8_txt_1  = "\xe7\x8b\x80\xe6\x85\x8b"
     utf8_txt_2  = "\xe7\x8b\x80\xe6\x85\x8b\xe7\x8b\x80"