OSDN Git Service
(root)
/
redminele
/
redmine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5259dec
)
Fixed: improper 0x5c char handling in PDF output (Go Maeda).
author
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Sat, 6 Oct 2007 14:27:35 +0000
(14:27 +0000)
committer
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Sat, 6 Oct 2007 14:27:35 +0000
(14:27 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@813
e93f8b46
-1217-0410-a6f0-
8f06a7374b81
app/helpers/ifpdf_helper.rb
patch
|
blob
|
history
diff --git
a/app/helpers/ifpdf_helper.rb
b/app/helpers/ifpdf_helper.rb
index
755692f
..
5e7fb28
100644
(file)
--- a/
app/helpers/ifpdf_helper.rb
+++ b/
app/helpers/ifpdf_helper.rb
@@
-53,10
+53,13
@@
module IfpdfHelper
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
@ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
txt = begin
- @ic.iconv(txt)
+ # 0x5c char handling
+ txtar = txt.split('\\')
+ txtar << '' if txt[-1] == ?\\
+ txtar.collect {|x| @ic.iconv(x)}.join('\\').gsub(/\\/, "\\\\\\\\")
rescue
txt
- end
+ end
|| ''
super w,h,txt,border,ln,align,fill,link
end