diff --git a/ChangeLog b/ChangeLog index b1f2d809..d2ff4e18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ -2022-02-08 Jay Berkenbilt +2022-02-09 Jay Berkenbilt * 10.6.0: release + * Fix one more PDF doc encoding omission: 0xAD is also undefined. + Fixes #637. + +2022-02-08 Jay Berkenbilt + * Bug fix: when splitting pages with --split-pages or selecting pages with --pages, set the output PDF version to the maximum of all the input PDF versions. This is a fix to QPDFJob. If you are diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc index d0ac13ed..c4aa3afb 100644 --- a/libqpdf/QUtil.cc +++ b/libqpdf/QUtil.cc @@ -2492,6 +2492,10 @@ QUtil::pdf_doc_to_utf8(std::string const& val) { ch_short = pdf_doc_low_to_unicode[ch - 24]; } + else if (ch == 173) + { + ch_short = 0xfffd; + } result += QUtil::toUTF8(ch_short); } return result; diff --git a/libtests/qtest/qutil/qutil.out b/libtests/qtest/qutil/qutil.out index 8bab099b..aedf49e1 100644 --- a/libtests/qtest/qutil/qutil.out +++ b/libtests/qtest/qutil/qutil.out @@ -88,8 +88,8 @@ alternatives 2: 83a9e99e 0: 717561636b done alternatives -w˘wˇwˆw˙w˝w˛w˚w˜w�w -done low characters +w˘wˇwˆw˙w˝w˛w˚w˜w�w�w +done other characters ---- whoami quack1 quack2 diff --git a/libtests/qutil.cc b/libtests/qutil.cc index e6fc4661..2142346e 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -418,10 +418,10 @@ void transcoding_test() print_alternatives(utf8); print_alternatives("quack"); std::cout << "done alternatives" << std::endl; - std::string low = QUtil::pdf_doc_to_utf8( - "w\030w\031w\032w\033w\034w\035w\036w\037w\177w"); - std::cout << low << std::endl; - std::cout << "done low characters" << std::endl; + std::string other = QUtil::pdf_doc_to_utf8( + "w\030w\031w\032w\033w\034w\035w\036w\037w\177w\255w"); + std::cout << other << std::endl; + std::cout << "done other characters" << std::endl; } void print_whoami(char const* str) diff --git a/manual/release-notes.rst b/manual/release-notes.rst index 28be7cef..13173407 100644 --- a/manual/release-notes.rst +++ b/manual/release-notes.rst @@ -6,7 +6,7 @@ Release Notes For a detailed list of changes, please see the file :file:`ChangeLog` in the source distribution. -10.6.0: February 8, 2022 +10.6.0: February 9, 2022 - Preparation for replacement of ``PointerHolder`` The next major release of qpdf will replace ``PointerHolder`` with