This project is read-only.

SEARCH Function Issues with "Ü"

Topics: Help requests, Issues
Jun 16, 2014 at 1:57 PM
Hey,

i just tried to search Messages which contains "Ü", but it wont work and i cant find any possibilities to encode or escape this letter. Any ideas?

Greetings fl0w
Coordinator
Jun 16, 2014 at 10:39 PM
Hi fl0w,

in order to send search queries with unicode characters, you need to specify the charset. I have given some instruction on how to do this in the thread Imap search query with non ascii characters (gmail) some time ago.

Here the snippet once again, updated to the latest version of the code:
var subject = "Bärtz";
var messages = client.Folders.Inbox.Search("CHARSET UTF-8 SUBJECT {" + Encoding.UTF8.GetByteCount(subject) + "}\r\n" + subject);
Give it a try, if you experience any issues or have further questions, let me know. Also feel free to contact me in German.

Greets,

Pavel