##// END OF EJS Templates
PDF: fix \\(double backslashes) handling of FPDF ANSI (#61, #117)....
Toshi MARUYAMA -
r5221:73a248530aa6
parent child
Show More
@@ -145,14 +145,12 module Redmine
145 145 def fix_text_encoding(txt)
146 146 @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
147 147 txt = begin
148 # 0x5c char handling
149 txtar = txt.split('\\')
150 txtar << '' if txt[-1] == ?\\
151 txtar.collect {|x| @ic.iconv(x)}.join('\\').gsub(/\\/, "\\\\\\\\")
148 @ic.iconv(txt)
152 149 rescue
153 150 txt
154 151 end || ''
155 return txt
152 # 0x5c char handling
153 txt.gsub(/\\/, "\\\\\\\\")
156 154 end
157 155
158 156 def RDMCell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
General Comments 0
You need to be logged in to leave comments. Login now