Fixed: improper 0x5c char handling in PDF output (Go Maeda).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@813 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5259dec061
commit
bb724e75c0
@ -53,10 +53,13 @@ module IfpdfHelper
|
|||||||
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
|
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
|
||||||
@ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
|
@ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
|
||||||
txt = begin
|
txt = begin
|
||||||
@ic.iconv(txt)
|
# 0x5c char handling
|
||||||
|
txtar = txt.split('\\')
|
||||||
|
txtar << '' if txt[-1] == ?\\
|
||||||
|
txtar.collect {|x| @ic.iconv(x)}.join('\\').gsub(/\\/, "\\\\\\\\")
|
||||||
rescue
|
rescue
|
||||||
txt
|
txt
|
||||||
end
|
end || ''
|
||||||
super w,h,txt,border,ln,align,fill,link
|
super w,h,txt,border,ln,align,fill,link
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user