diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-30 03:26:24 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-30 03:26:24 +0000 |
commit | aff157f0a07e3b47994b739b50bf4070cbee40ab (patch) | |
tree | 95b1f91b8091211c4fb96d10eeb7baffe6263f70 /vendor | |
parent | ad5dcaf179ea0db64f4ce737dabcc227aad66af1 (diff) | |
download | redmine-aff157f0a07e3b47994b739b50bf4070cbee40ab.tar.gz redmine-aff157f0a07e3b47994b739b50bf4070cbee40ab.zip |
PDF: transplant r287 (#61).
Fix for #9.
Export feature(to csv/pdf) doesn't work in Japanese
csv and pdf encoding are know defined for each language
(general_csv_encoding and general_pdf_encoding keys in lang files)
added SJIS font for japanese pdf exports.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5249 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/plugins/rfpdf/lib/fpdf/japanese.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/plugins/rfpdf/lib/fpdf/japanese.rb b/vendor/plugins/rfpdf/lib/fpdf/japanese.rb index 7340936bb..4e611a6f6 100644 --- a/vendor/plugins/rfpdf/lib/fpdf/japanese.rb +++ b/vendor/plugins/rfpdf/lib/fpdf/japanese.rb @@ -146,13 +146,13 @@ module PDF_Japanese b2='LR' else b2='' - if(border.index('L').nil?) + if(border.to_s.index('L')) b2+='L' end - if(border.index('R').nil?) + if(border.to_s.index('R')) b2+='R' end - b=border.index('T').nil? ? b2+'T' : b2 + b=border.to_s.index('T') ? b2+'T' : b2 end end sep=-1 @@ -163,7 +163,7 @@ module PDF_Japanese while(i<nb) #Get next character c=s[i] - o=ord(c) + o=c #o=ord(c) if(o==10) #Explicit line break Cell(w,h,s[j,i-j],b,2,align,fill) @@ -221,7 +221,7 @@ module PDF_Japanese end end #Last chunk - if(border and not border.index('B').nil?) + if(border and not border.to_s.index('B').nil?) b+='B' end Cell(w,h,s[j,i-j],b,2,align,fill) |