Michael M Slusarz <slusarz@curecanti.org> writes:
Quoting Eric Abrahamsen <eric@ericabrahamsen.net>:
While I've got you here, I hope you'll answer one more question: what's the format for searching multiple terms with non-ascii strings? Is it possible in one run to find a utf-8 encoded subject, and a utf-8 encoded body?
IMAP interaction would look like this:
C: . UID SEARCH CHARSET UTF-8 SUBJECT {4} S: +OK C: aéb BODY {4} S: +OK C: aéb S: * SEARCH XXX S: . OK
Even better... if the server supports LITERAL+, you don't have to wait for the synchronizing literal which prevents the need to wait for 2 round-trips from the server:
C: . UID SEARCH CHARSET UTF-8 SUBJECT {4+} C: aéb BODY {4+} C: aéb[CRLF] S: * SEARCH XXX S: . OK
Brilliant, thanks a lot! Not something I would have guessed on my own, and surprisingly hard to find online -- I'm learning to read the RFCs...
Thanks again, Eric