Bug#818469: /usr/share/hplip/base/sixext.py: Printing from some PDF files fails in pdftops conversion with python UTF8 error
On Thu 17 Mar 2016 at 10:34:30 +0000, jgiemail-debian@yahoo.es wrote:
> Package: hplip-data
> Version: 3.16.2+repack0-7
> Severity: normal
> File: /usr/share/hplip/base/sixext.py
> Tags: patch
>
> Dear Debian Maintainer,
>
> Trying to print some PDF files from atril (MATE's desktop environment viewer) fails
> with print error:
>
> "There was a problem processing document ..."
>
> I tried with the hplip-data in testing (3.16.2+repack0-4), and the one in
> unstable (3.16.2+repack0-7).
[error_log snipped]
> The error lines are:
>
> D [17/Mar/2016:09:27:43 +0100] [Job 267] File \"/usr/share/hplip/base/sixext.py\", line 109, in to_bytes_utf8
> D [17/Mar/2016:09:27:43 +0100] [Job 267] return s.encode(\"utf-8\")
> D [17/Mar/2016:09:27:43 +0100] [Job 267] UnicodeEncodeError: \'utf-8\' codec can\'t encode character \'\\udce2\' in position 31: surrogates not allowed
>
> ==================================================
>
> I found a solution (or workaroud) at:
> https://bugs.launchpad.net/hplip/+bug/1498366
>
> Change line 109 in /usr/share/hplip/base/sixext.py
> "return s.encode("utf-8")"
> with
> "return s.encode("utf-8", errors="surrogateescape")".
>
> with this change, the filter works, and the printer prints.
Upstream appear willing to fix this issue. LP #1498366 has
Changed in hplip:
status: In Progress → Fix Committed
from kritika arora (kritika-arora1) on 2017-02-07.
However, hplip_3.18.6+dfsg0.orig.tar.xz in experimental has no mention
of "surrogate". Perhaps the fix has been done in another way (test) or
it will appear in a future release of hplip. I'd suggest some gentle
prodding at #1498366 to ascertain upstream's intentions.
Regards,
Brian.
Reply to: