--- poppler/Annot.cc | 2 +- poppler/CharCodeToUnicode.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -4087,7 +4087,7 @@ void Annot::layoutText(GooString *text, // This assumes an identity CMap. outBuf->append((uChar >> 8) & 0xff); outBuf->append(uChar & 0xff); - } else if (ccToUnicode->mapToCharCode(&uChar, &c, 1)) { + } else if (ccToUnicode->mapToCharCode(&uChar, &c, 2)) { ccToUnicode->decRefCnt(); if (font->isCIDFont()) { // TODO: This assumes an identity CMap. It should be extended to --- a/poppler/CharCodeToUnicode.cc +++ b/poppler/CharCodeToUnicode.cc @@ -633,7 +633,7 @@ int CharCodeToUnicode::mapToUnicode(Char int CharCodeToUnicode::mapToCharCode(Unicode* u, CharCode *c, int usize) { //look for charcode in map - if (usize == 1) { + if (usize == 1 || (usize > 1 && !(*u & ~0xff))) { if (isIdentity) { *c = (CharCode) *u; return 1;