summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2013-11-18 22:58:28 +0100
committerAlbert Astals Cid <aacid@kde.org>2013-11-18 22:58:28 +0100
commitc01cee165392ba8297e4168111a66d2acb272a99 (patch)
treeb395814b6412d76d8107c1ac06defedc38738df5 /utils
parent07c255482f7ec8a8cfd4eaeaf7b07de317bbcc7a (diff)
parent47605a8aaf85bee21601219b04c0c8e6cf982507 (diff)
Merge remote-tracking branch 'origin/poppler-0.24'
Conflicts: poppler/Catalog.cc poppler/Catalog.h
Diffstat (limited to 'utils')
-rw-r--r--utils/pdftotext.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index c90968db..5eb2b414 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -439,7 +439,7 @@ static void printInfoString(FILE *f, Dict *infoDict, const char *key,
GooString *s1;
GBool isUnicode;
Unicode u;
- char buf[8];
+ char buf[9];
int i, n;
if (infoDict->lookup(key, &obj)->isString()) {
@@ -463,7 +463,9 @@ static void printInfoString(FILE *f, Dict *infoDict, const char *key,
++i;
}
n = uMap->mapUnicode(u, buf, sizeof(buf));
- fwrite(buf, 1, n, f);
+ buf[n] = '\0';
+ const std::string myString = myXmlTokenReplace(buf);
+ fputs(myString.c_str(), f);
}
fputs(text2, f);
}