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
144 144

  
145 145
        def fix_text_encoding(txt)
146 146
          @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
147
          # these quotation marks are not correctly rendered in the pdf
148
          txt = txt.gsub(/[“�]/, '"') if txt
149 147
          txt = begin
150 148
            # 0x5c char handling
151 149
            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
130 130
  	nb=s.length
131 131
  	i=0
132 132
  	while(i<nb)
133
  		c=s[i]
133
  		c=s[i].ord
134 134
  		if(c<128)
135 135
  			l+=cw[c.chr] if cw[c.chr]
136 136
  			i+=1
......
182 182
  	nl=1
183 183
  	while(i<nb)
184 184
  		#Get next character
185
  		c=s[i]
185
  		c=s[i].ord
186 186
  		#Check if ASCII or MB
187 187
  		ascii=(c<128)
188 188
  		if(c.chr=="\n")
......
258 258
  	nl=1
259 259
  	while(i<nb)
260 260
  		#Get next character
261
  		c=s[i]
261
  		c=s[i].ord
262 262
  		#Check if ASCII or MB
263 263
  		ascii=(c<128)
264 264
  		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
100 100
  	nb=s.length
101 101
  	i=0
102 102
  	while(i<nb)
103
  		o=s[i]
103
  		o=s[i].ord
104 104
  		if(o<128)
105 105
  			#ASCII
106 106
  			l+=cw[o.chr] if cw[o.chr]
......
158 158
  	nl=1
159 159
  	while(i<nb)
160 160
  		#Get next character
161
  		c=s[i]
161
  		c=s[i].ord
162 162
  		o=c #o=ord(c)
163 163
  		if(o==10)
164 164
  			#Explicit line break
......
246 246
  	nl=1
247 247
  	while(i<nb)
248 248
  		#Get next character
249
  		c=s[i]
249
  		c=s[i].ord
250 250
  		o=c
251 251
  		if(o==10)
252 252
  			#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
99 99
  	nb=s.length
100 100
  	i=0
101 101
  	while(i<nb)
102
  		c=s[i]
102
  		c=s[i].ord
103 103
  		if(c<128)
104 104
  			l+=cw[c.chr] if cw[c.chr]
105 105
  			i+=1
......
151 151
  	nl=1
152 152
  	while(i<nb)
153 153
  		#Get next character
154
  		c=s[i]
154
  		c=s[i].ord
155 155
  		#Check if ASCII or MB
156 156
  		ascii=(c<128)
157 157
  		if(c.chr=="\n")
......
227 227
  	nl=1
228 228
  	while(i<nb)
229 229
  		#Get next character
230
  		c=s[i]
230
  		c=s[i].ord
231 231
  		#Check if ASCII or MB
232 232
  		ascii=(c<128)
233 233
  		if(c.chr=="\n")
(34-34/46)