summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/chinese.rb6
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/japanese.rb6
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/korean.rb6
3 files changed, 9 insertions, 9 deletions
diff --git a/vendor/plugins/rfpdf/lib/fpdf/chinese.rb b/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
index 94f8ee49d..dca53c556 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
@@ -130,7 +130,7 @@ module PDF_Chinese
nb=s.length
i=0
while(i<nb)
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
@@ -182,7 +182,7 @@ module PDF_Chinese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
@@ -258,7 +258,7 @@ module PDF_Chinese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
diff --git a/vendor/plugins/rfpdf/lib/fpdf/japanese.rb b/vendor/plugins/rfpdf/lib/fpdf/japanese.rb
index 93bc283cc..78f6ce932 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/japanese.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/japanese.rb
@@ -100,7 +100,7 @@ module PDF_Japanese
nb=s.length
i=0
while(i<nb)
- o=s[i]
+ o = s[i].is_a?(String) ? s[i].ord : s[i]
if(o<128)
#ASCII
l+=cw[o.chr] if cw[o.chr]
@@ -158,7 +158,7 @@ module PDF_Japanese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c #o=ord(c)
if(o==10)
#Explicit line break
@@ -246,7 +246,7 @@ module PDF_Japanese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c
if(o==10)
#Explicit line break
diff --git a/vendor/plugins/rfpdf/lib/fpdf/korean.rb b/vendor/plugins/rfpdf/lib/fpdf/korean.rb
index 0d4ee3f6e..1777ab09a 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/korean.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/korean.rb
@@ -99,7 +99,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nb=s.length
i=0
while(i<nb)
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
@@ -151,7 +151,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
@@ -227,7 +227,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")