Re: Problem with accented characters in mailbox.Maildir()

2023-05-09 Thread Peter J. Holzer
On 2023-05-08 23:02:18 +0200, jak wrote: > Peter J. Holzer ha scritto: > > On 2023-05-06 16:27:04 +0200, jak wrote: > > > Chris Green ha scritto: > > > > Chris Green wrote: > > > > > A bit more information, msg.get("subject", "unknown") does return a > > > > > string, as follows:- > > > > > > > >

Re: Problem with accented characters in mailbox.Maildir()

2023-05-08 Thread Peter J. Holzer
On 2023-05-06 16:27:04 +0200, jak wrote: > Chris Green ha scritto: > > Chris Green wrote: > > > A bit more information, msg.get("subject", "unknown") does return a > > > string, as follows:- > > > > > > Subject: > > > =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?=

Re: Problem with accented characters in mailbox.Maildir()

2023-05-08 Thread jak
Chris Green ha scritto: Chris Green wrote: A bit more information, msg.get("subject", "unknown") does return a string, as follows:- Subject: =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?= So it's the 'searchTxt in msg.get("subject", "unknown")' that's failing.

Re: Problem with accented characters in mailbox.Maildir()

2023-05-08 Thread Chris Green
Chris Green wrote: > A bit more information, msg.get("subject", "unknown") does return a > string, as follows:- > > Subject: > =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?= > > So it's the 'searchTxt in msg.get("subject", "unknown")' that's > failing. I.e. for so

Re: Problem with accented characters in mailbox.Maildir()

2023-05-08 Thread Chris Green
A bit more information, msg.get("subject", "unknown") does return a string, as follows:- Subject: =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?= So it's the 'searchTxt in msg.get("subject", "unknown")' that's failing. I.e. for some reason 'in' isn't working when th

Re: Problem with accented characters in mailbox.Maildir()

2023-05-08 Thread jak
Chris Green ha scritto: I have a custom mail filter in python that uses the mailbox package to open a mail message and give me access to the headers. So I have the following code to open each mail message:- # # # Read the message from standard input and make a message object from

Problem with accented characters in mailbox.Maildir()

2023-05-08 Thread Chris Green
I have a custom mail filter in python that uses the mailbox package to open a mail message and give me access to the headers. So I have the following code to open each mail message:- # # # Read the message from standard input and make a message object from it # msg = mailb