Commit 235c89e037d6d9925cf201cadfa9e0df1771212c

Authored by Jay Berkenbilt
1 parent 15248592

Fix one more PDF doc encoding error for 10.6 release (fixes #637)

ChangeLog
1   -2022-02-08 Jay Berkenbilt <ejb@ql.org>
  1 +2022-02-09 Jay Berkenbilt <ejb@ql.org>
2 2  
3 3 * 10.6.0: release
4 4  
  5 + * Fix one more PDF doc encoding omission: 0xAD is also undefined.
  6 + Fixes #637.
  7 +
  8 +2022-02-08 Jay Berkenbilt <ejb@ql.org>
  9 +
5 10 * Bug fix: when splitting pages with --split-pages or selecting
6 11 pages with --pages, set the output PDF version to the maximum of
7 12 all the input PDF versions. This is a fix to QPDFJob. If you are
... ...
libqpdf/QUtil.cc
... ... @@ -2492,6 +2492,10 @@ QUtil::pdf_doc_to_utf8(std::string const&amp; val)
2492 2492 {
2493 2493 ch_short = pdf_doc_low_to_unicode[ch - 24];
2494 2494 }
  2495 + else if (ch == 173)
  2496 + {
  2497 + ch_short = 0xfffd;
  2498 + }
2495 2499 result += QUtil::toUTF8(ch_short);
2496 2500 }
2497 2501 return result;
... ...
libtests/qtest/qutil/qutil.out
... ... @@ -88,8 +88,8 @@ alternatives
88 88 2: 83a9e99e
89 89 0: 717561636b
90 90 done alternatives
91   -w˘wˇwˆw˙w˝w˛w˚w˜w�w
92   -done low characters
  91 +w˘wˇwˆw˙w˝w˛w˚w˜w�w�w
  92 +done other characters
93 93 ---- whoami
94 94 quack1
95 95 quack2
... ...
libtests/qutil.cc
... ... @@ -418,10 +418,10 @@ void transcoding_test()
418 418 print_alternatives(utf8);
419 419 print_alternatives("quack");
420 420 std::cout << "done alternatives" << std::endl;
421   - std::string low = QUtil::pdf_doc_to_utf8(
422   - "w\030w\031w\032w\033w\034w\035w\036w\037w\177w");
423   - std::cout << low << std::endl;
424   - std::cout << "done low characters" << std::endl;
  421 + std::string other = QUtil::pdf_doc_to_utf8(
  422 + "w\030w\031w\032w\033w\034w\035w\036w\037w\177w\255w");
  423 + std::cout << other << std::endl;
  424 + std::cout << "done other characters" << std::endl;
425 425 }
426 426  
427 427 void print_whoami(char const* str)
... ...
manual/release-notes.rst
... ... @@ -6,7 +6,7 @@ Release Notes
6 6 For a detailed list of changes, please see the file
7 7 :file:`ChangeLog` in the source distribution.
8 8  
9   -10.6.0: February 8, 2022
  9 +10.6.0: February 9, 2022
10 10 - Preparation for replacement of ``PointerHolder``
11 11  
12 12 The next major release of qpdf will replace ``PointerHolder`` with
... ...