From 7abaa570c607cfe7387c04bd32438154345fd02c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2012 22:53:53 +0000 Subject: [PATCH] Fix for ruby1.9.3. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8739 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf.rb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index f6d6f8cb1..f44612c6f 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -98,7 +98,7 @@ module Redmine def textstring(s) # Format a text string - if s.chars.first == '<' # This means the string is hex-dumped. + if s =~ /^ utf16, :l => level, :p => PageNo(), :y => (@h - y)*@k} + @outlines << {:t => txt, :l => level, :p => PageNo(), :y => (@h - y)*@k} + end + + def bookmark_title(txt) + txt = begin + utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt) + hextxt = "" + rescue + txt + end || '' end def putbookmarks @@ -184,7 +194,7 @@ module Redmine n=self.n+1 @outlines.each_with_index do |o, i| newobj() - out('<