
On 14.09.18,17:34, Andreas Schamanek wrote:
On Fri, 14 Sep 2018, at 15:40, Jostein Berntsen wrote:
when I use recipes like these to filter messages with Scadinavian characters (æ,ø,å) in Subject it fails to work. My locale is nb_NO.UTF-8. Is there a recipe that can be used to match these cases?
:0 * ^Subject:.*lån innboks/IN-spam/
A proper message must have such characters encoded. Look at the source of messages. You will see something like (for "lån")
=?UTF-8?B?bMOlbg==?=
When you match against this (mind the ? und escape them as \?) it should work.
Thanks. I solved it doing this: :0 h * ^Subject:.*=\? SUBJECT=| formail -cXSubject: | perl -MEncode -ne 'print encode("UTF8",decode("MIME-Header",$_))' :0 hE SUBJECT=| formail -cXSubject: :0 * SUBJECT ?? ^Subject:.*lån innboks/IN-spam/ Something for the manual maybe? Jostein