[okular] [Bug 364809] can't print file that contains invalid UTF-8 sequence

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Fri Sep 28 12:59:58 BST 2018


https://bugs.kde.org/show_bug.cgi?id=364809

--- Comment #17 from peter.maloney at brockmann-consult.de ---
I don't know what info you are waiting for.

Could you just work around the lpr problem by checking for valid UTF-8 and
replacing invalid bits with "?" instead? Simply forbid sending invalid output
to the lpr command's input. It's a good software development practice to "be
generous with input and strict about output"

And for the other problem about the filename, you can probably just avoid
encoding/decoding the filename at all, just using it as latin1 / iso-8859-1 in
your strings, which won't change anything. Opening files basically uses
syscalls that work already, so you just have to avoid lossy conversions of this
malformed character data.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list