]> source.dussan.org Git - redmine.git/commitdiff
Merged r11637 from trunk to 2.2-stable (#13354)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 16 Mar 2013 08:02:20 +0000 (08:02 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 16 Mar 2013 08:02:20 +0000 (08:02 +0000)
PDF: fix incompatible character encodings: UTF-8 and ASCII-8BIT.

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.2-stable@11638 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/issues_helper.rb

index 5073571f60ad1b329b4c876ded3bd55eb7684100..466d2d4a9859bb062e2362ecc27662deeddc8f28 100644 (file)
@@ -350,7 +350,10 @@ module IssuesHelper
     association = Issue.reflect_on_association(field.to_sym)
     if association
       record = association.class_name.constantize.find_by_id(id)
-      return record.name if record
+      if record
+        record.name.force_encoding('UTF-8') if record.name.respond_to?(:force_encoding)
+        return record.name
+      end
     end
   end