From 04edfe9fade7e77342f5e4fe694ee071554a119c Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 23 Jan 2021 17:58:23 -0500 Subject: QPDFObjectHandle::newUnicodeString to uses UTF-16 only when needed Use the first of ASCII, PDFDocEncoding, or UTF-16 that is capable of encoding the string. --- ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 49ae1882..4b0a238a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2021-01-23 Jay Berkenbilt + + * Change behavior of QPDFObjectHandle::newUnicodeString so that it + encodes ASCII or PDFDocEncoding if those encodings will support + all the characters in the string, resorting to UTF-16 only if the + other encodings are insufficient. This is a cleaner implementation + of the intention of encoding strings for use outside of contents + and results in fewer instances of ASCII strings being needlessly + encoded as UTF-16. This change may cause qpdf to generate + different output from the same input when form field values are + set using methods from QPDFFormFieldObjectHelper. + 2021-01-16 Jay Berkenbilt * Add new constructors for QPDFNameTreeObjectHelper and -- cgit v1.2.3-54-g00ecf