aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qtest
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-02-18 00:47:57 +0100
committerJay Berkenbilt <ejb@ql.org>2018-02-19 03:06:27 +0100
commit4bb3046f0b139337a00e9182c9b47d1a3f8f8bb3 (patch)
tree455bf56b35aeda95a9e4581f7e0c31cf7d07c877 /examples/qtest
parent2780a1871d2603e9b273580fb7978d277832c2fc (diff)
downloadqpdf-4bb3046f0b139337a00e9182c9b47d1a3f8f8bb3.tar.zst
Properly handle strings with PDF Doc Encoding (fixes #179)
The QPDF_String::getUTF8Val() method was not treating strings that weren't explicitly Unicode as PDF Doc Encoded. This only affects characters in the range 0x80 through 0xa0.
Diffstat (limited to 'examples/qtest')
-rw-r--r--examples/qtest/bookmarks.test8
-rw-r--r--examples/qtest/bookmarks/issue-179.out12
-rw-r--r--examples/qtest/bookmarks/issue-179.pdfbin0 -> 1824 bytes
3 files changed, 19 insertions, 1 deletions
diff --git a/examples/qtest/bookmarks.test b/examples/qtest/bookmarks.test
index 655be2e6..395357e3 100644
--- a/examples/qtest/bookmarks.test
+++ b/examples/qtest/bookmarks.test
@@ -48,4 +48,10 @@ $td->runtest("bookmarks deleted",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
-$td->report(10);
+$td->runtest("non-trivial pdf doc to unicode",
+ {$td->COMMAND => "pdf-bookmarks issue-179.pdf"},
+ {$td->FILE => "issue-179.out",
+ $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->report(11);
diff --git a/examples/qtest/bookmarks/issue-179.out b/examples/qtest/bookmarks/issue-179.out
new file mode 100644
index 00000000..1ff8dec9
--- /dev/null
+++ b/examples/qtest/bookmarks/issue-179.out
@@ -0,0 +1,12 @@
+žč
+žđ
+žć
+žš
+ž ajklyghvbnmxcseqwuioprtzdf
+šč
+šđ
+šć
+šž
+š ajklyghvbnmxcseqwuioprtzdf
diff --git a/examples/qtest/bookmarks/issue-179.pdf b/examples/qtest/bookmarks/issue-179.pdf
new file mode 100644
index 00000000..e03d8c42
--- /dev/null
+++ b/examples/qtest/bookmarks/issue-179.pdf
Binary files differ