diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-06 04:27:38 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-06 04:27:38 +0000 |
commit | 73a248530aa636644de0b6d8765b0e84e056eb33 (patch) | |
tree | 44289c138b5cbf5680a844bb5020eb4204f24000 /lib | |
parent | 7f923cdc66dbf5c58fcbef377cecb7c68fd96c9d (diff) | |
download | redmine-73a248530aa636644de0b6d8765b0e84e056eb33.tar.gz redmine-73a248530aa636644de0b6d8765b0e84e056eb33.zip |
PDF: fix \\(double backslashes) handling of FPDF ANSI (#61, #117).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5341 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/export/pdf.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index e512d7f3c..a7fd56aa8 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -145,14 +145,12 @@ module Redmine def fix_text_encoding(txt) @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8') txt = begin - # 0x5c char handling - txtar = txt.split('\\') - txtar << '' if txt[-1] == ?\\ - txtar.collect {|x| @ic.iconv(x)}.join('\\').gsub(/\\/, "\\\\\\\\") + @ic.iconv(txt) rescue txt end || '' - return txt + # 0x5c char handling + txt.gsub(/\\/, "\\\\\\\\") end def RDMCell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='') |