Project

General

Profile

Defect #6505 » japanese.rb_utf8.patch

Jun NAITOH, 2011-03-22 22:24

View differences:

vendor/plugins/rfpdf/lib/rfpdf/japanese.rb 2011-03-07 14:44:39.000000000 -0500 → vendor/plugins/rfpdf/lib/rfpdf/japanese.rb 2011-03-20 15:17:35.000000000 -0400
o=s[i]
if(o<128)
#ASCII
l+=cw[o.chr]
l+=cw[o.chr] if cw[o.chr]
i+=1
elsif(o>=161 and o<=223)
#Half-width katakana
......
end
if(o<128)
#ASCII
l+=cw[c.chr]
l+=cw[c.chr] || 0
n=1
if(o==32)
sep=i
......
Cell(w,h,s[j,i-j],b,2,align,fill)
else
Cell(w,h,s[j,sep-j],b,2,align,fill)
i=(s[sep]==' ') ? sep+1 : sep
i=(s[sep].chr==' ') ? sep+1 : sep
end
sep=-1
j=i
......
end
if(o<128)
#ASCII
l+=cw[c.chr]
l+=cw[c.chr] || 0
n=1
if(o==32)
sep=i
......
Cell(w,h,s[j,i-j],0,2,'',0,link)
else
Cell(w,h,s[j,sep-j],0,2,'',0,link)
i=(s[sep]==' ') ? sep+1 : sep
i=(s[sep].chr==' ') ? sep+1 : sep
end
sep=-1
j=i
(8-8/9)