##// END OF EJS Templates
PDF: add test of Ruby 1.9 compatibility of '0x5c'(backslash) handling in FPDF ANSI (#61, #117)....
Toshi MARUYAMA -
r5224:411c7100cb73
parent child
Show More
@@ -44,4 +44,19 class PdfTest < ActiveSupport::TestCase
44 44 assert_equal '\\\\\\\\abcd\\\\\\\\abcd\\\\\\\\',
45 45 pdf.fix_text_encoding('\\\\abcd\\\\abcd\\\\')
46 46 end
47
48 def test_fix_text_encoding_backslash_ja_cp932
49 pdf = Redmine::Export::PDF::IFPDF.new('ja')
50 assert pdf
51 assert_equal "\x83\\\\\x98A",
52 pdf.fix_text_encoding("\xe3\x82\xbd\xe9\x80\xa3")
53 assert_equal "\x83\\\\\x98A\x91\xe3\x95\\\\",
54 pdf.fix_text_encoding("\xe3\x82\xbd\xe9\x80\xa3\xe4\xbb\xa3\xe8\xa1\xa8")
55 assert_equal "\x91\xe3\x95\\\\\\\\",
56 pdf.fix_text_encoding("\xe4\xbb\xa3\xe8\xa1\xa8\\")
57 assert_equal "\x91\xe3\x95\\\\\\\\\\\\",
58 pdf.fix_text_encoding("\xe4\xbb\xa3\xe8\xa1\xa8\\\\")
59 assert_equal "\x91\xe3\x95\\\\a\\\\",
60 pdf.fix_text_encoding("\xe4\xbb\xa3\xe8\xa1\xa8a\\")
61 end
47 62 end
General Comments 0
You need to be logged in to leave comments. Login now