#878142 muttprint: some non-ASCII characters are silently missing from the generated .ps file

#878142#5
Date:
2017-10-10 11:43:53 UTC
From:
To:
When I used muttprint (with print to file, for checking) on a mail
with δ and ε characters, these characters were silently missing
from the generated .ps file.

With debug output, I can see errors:

! Undefined control sequence.
\u-default-949 #1->\textepsilon

! Undefined control sequence.
\u-default-948 #1->\textdelta

#878142#10
Date:
2017-10-10 13:55:36 UTC
From:
To:
I think that the easiest solution would be to use xelatex and
a font that the required characters (DejaVu Sans Mono seems one
of the most complete fonts).

I've attached a patch that does this (mainly for testing), but
I haven't tried in non-UTF8 locales (I suppose that the input
should be converted to UTF8 or \XeTeXinputencoding should be
used) and the font is hardcoded in the patch.

#878142#15
Date:
2026-10-12 11:36:19 UTC
From:
To:
Hi,

this bug is paining me since forever now, and even after tinkering I
don't have the right solution, but a least a solution that works for
me (mostly).

Seeing that this bug now will have it's tenth anniversary soon, and
given that nothing ever will happen upstream anymore with this big
hack for a niche audience, I post my patch here for inspiration.
But, it's not meant to be *the patch* that fixes this bug once and
forever.  (Note that the main mono font in my patch is also Julia
Mono, which is not distributed by debian.)

So this patch did nothing for me, a lot of UTF-8 characters in the
mail body were still rendered as boxes.

In my setting I have to deal with utf-8 mails that contain
mathematical symbols, various Indic scripts, and also Japanese.  From
my understanding, there is no one-fits-all UTF-8 rendering solution
that muttprint could use as a template.

For my purpose I now switched to lulatex as the latex backend, and I
come up with some fall-back chain in lua ... the list of fallbacks should be
increased for more general cases maybe?

(Also, some emails that contain a lot of Japanese and rarer characters
still fail to print.)

Here is the way I use muttprint in my .muttrc:

set print_command='set -e; f=`mktemp`; \
     /home/edmundherenz/bash-scripts/ciscoclean.sh | muttprint \
     --penguin /usr/share/ospics/BabyTuX.png -P A4 -p TO_FILE:"$f"; \
     okular "$f"; rm "$f"'


CH.