Quoting Eric Abrahamsen <e...@ericabrahamsen.net>:

Hi there,

I'm looking into improving IMAP search support for the Gnus Emacs mail
client, and trying to add the ability to search non-ascii characters. So
far as I know, I start this invocation with something like:

. UID SEARCH CHARSET UTF-8 TEXT {NNN}

Where NNN is the number of bytes in my search string. Dovecot then
responds with:

+ OK

So... what do I do then? I don't actually know what the next statement
is, to provide the actual search string itself. Googling has proved
unhelpful, as most of the examples online don't actually show this "+
OK" response. Can someone just briefly outline what's meant to happen
next? I've tried including the search string immediately after the
byte-size, separated by various combinations of \n\r, but that always
gives me a "Missing LF after literal size" error.

Your example, assuming your search text is "aéb":

. UID SEARCH CHARSET UTF-8 TEXT {4}
+OK
aéb[CRLF]
* SEARCH XXX
. OK

Literal length is the number of octets in the string - not the number of characters - so not sure if that was tripping you up.

michael

Reply via email to