Project

General

Profile

Defect #61 » pdf_ruby19.patch

Jun NAITOH, 2011-04-04 00:47

View differences:

lib/redmine/export/pdf.rb 2011-04-03 23:49:32.000000000 +0900 → lib/redmine/export/pdf.rb 2011-04-04 07:42:12.000000000 +0900
def fix_text_encoding(txt)
@ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
# these quotation marks are not correctly rendered in the pdf
txt = txt.gsub(/[“�]/, '"') if txt
txt = begin
# 0x5c char handling
txtar = txt.split('\\')
vendor/plugins/rfpdf/lib/fpdf/chinese.rb 2011-04-03 23:50:16.000000000 +0900 → vendor/plugins/rfpdf/lib/fpdf/chinese.rb 2011-04-03 23:50:48.000000000 +0900
nb=s.length
i=0
while(i<nb)
c=s[i]
c=s[i].ord
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
......
nl=1
while(i<nb)
#Get next character
c=s[i]
c=s[i].ord
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
......
nl=1
while(i<nb)
#Get next character
c=s[i]
c=s[i].ord
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
vendor/plugins/rfpdf/lib/fpdf/japanese.rb 2011-04-03 23:50:07.000000000 +0900 → vendor/plugins/rfpdf/lib/fpdf/japanese.rb 2011-04-03 23:50:46.000000000 +0900
nb=s.length
i=0
while(i<nb)
o=s[i]
o=s[i].ord
if(o<128)
#ASCII
l+=cw[o.chr] if cw[o.chr]
......
nl=1
while(i<nb)
#Get next character
c=s[i]
c=s[i].ord
o=c #o=ord(c)
if(o==10)
#Explicit line break
......
nl=1
while(i<nb)
#Get next character
c=s[i]
c=s[i].ord
o=c
if(o==10)
#Explicit line break
vendor/plugins/rfpdf/lib/fpdf/korean.rb 2011-04-03 23:50:24.000000000 +0900 → vendor/plugins/rfpdf/lib/fpdf/korean.rb 2011-04-03 23:50:44.000000000 +0900
nb=s.length
i=0
while(i<nb)
c=s[i]
c=s[i].ord
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
......
nl=1
while(i<nb)
#Get next character
c=s[i]
c=s[i].ord
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
......
nl=1
while(i<nb)
#Get next character
c=s[i]
c=s[i].ord
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
(34-34/46)