Hi,

I am using naughty to display new mails and have trouble with invalid
UTF characters. I extract the From: and Subject: header lines from the
mails and hand them over to naughty.notify.

Those lines often contain encoded characters. In that case, the line
gets marked with something like

    =?windows-1252?Q?sometext_=28...?=.

I managed to decode most of those lines fine by piping them through

    perl -MEncode -e'while (<>) { print decode(\"MIME-Header\", $_) }'

but sometimes I end up with some invalid characters (probably due to
incorrectly encoded mails). I then get an error like this:

    W: awesome: draw_text_context_init:174: cannot parse pango markup:
    Error on line 3 char 69: Invalid UTF-8 encoded text - not valid
    '...'

Does anyone know a way I could work around this? Either by enhancing the
perl snippet somehow, or by telling awesome somehow to ignore these
errors?

The bad thing is that once I have just one such character in my text,
the whole notification won't show up.


Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)

Attachment: signature.asc
Description: Digital signature

Reply via email to