xpdf copy & paste and unicode

540
newtothis

Since updating to debian jessie I have a problem with copy and paste from PDF files using xpdf: only letters/symbols contained in ASCII are copied correctly. All other symbols/letters are in some way garbeld.

For example I have a PDF file containg the German word "Würde". Copying it from xpdf and pasting it I get: "Würde". Other PDF readers (e.g. acroread, zathura) work ok. The problem arrises with all PDF files containing non ASCII text/symbols.

In /etc/xpdf/xpdfrc I have:

textEncoding UTF-8

I tested it with Latin1 and ASCII, but there was no change at all. (There is no .xpdfrc in my home folder.)

> locale LANG=de_DE.UTF-8 LANGUAGE= LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES=POSIX LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= > locale -a C C.UTF-8 de_DE.utf8 POSIX 

Any suggestions how I could get copy and paste working again?

1
`ü` похоже на то, как двоичные данные отображаются при интерпретации кодировки UTF-8` ü` как ISO-8859-1 или -15, что может быть здесь подсказкой. (* Что-то * в вашей системе, вероятно, говорит ISO-8859-1 / 15, когда оно должно говорить UTF-8.) Пожалуйста, [отредактируйте] свой вопрос, чтобы включить вывод выполнения обоих `locale` и` locale -a` на ваша система. a CVn 8 лет назад 0
Как и в случае с другими программами pdfviewers, копирование и вставка работает нормально. Я подумал, что это что-то очень близкое к самому xpdf. Что кроме xpdf это может быть? (Я добавил вывод двух рекомендованных вами команд.) newtothis 8 лет назад 0

1 ответ на вопрос

1
newtothis

The problem is the result of two bugs of Debian's xpdf:

#737989 describes the problem (selection of non-ASCII characters no longer works) and provides a patch in two patch files. Unfortunately applying the patch doesn't solve the problem.

This is linked to a second bug #739271 (many config file directives not working). Applying additionally to the patch above the patches provided here (poppler-xpdfparams, poppler-gfile-dedupe -- second one probably not necessary) and changing /debian/patches/series and /debian/rules as explained in message #22 to this bug, seems to resolve the problem.

To prevent cluttering of the screen with too many error messages I also commented out the line include /etc/xpdf/includes in /etc/xpdf/xpdfrc.

Похожие вопросы