`TIdIMAP4.UIDSearchMailBox()` works perfectly for ASCII characters, but for non-ASCII characters, such as in Persian/Farsi, the server doesn't return anything.

For example, when I search for emails that contain "foo" in the body, it works. But when I try to search for "سودابه", it does not work.

The IMAP command for my search is:

`C9 UID SEARCH CHARSET UTF-8 UID 84:* BODY {N}\r\nsomething in Farsi that is encoded with UTF-8`

Where `84:*` is the range of email UIDs, `N` is the byte count of the UTF-8 encoded search text, and `\r\n` is a CRLF line break. The command will be submitted in two steps.

I'm pretty sure that there are some emails matching this search criteria.

I saw this issue on Gmail, Microsoft Exchange, and hMail servers.

Do you have any idea?

Here is abstract of my codes:

```
procedure TForm1.btn_GetMailsBySearchClick(Sender: TObject);
begin
   :
   DoLog('Searching mail box started');
   if not id_IMAP.UIDSearchMailBox(FSearchInfoArray) then
   begin
     DoLog(SearchMailBox failed, True);
     Exit;
   end;   
   :
end;

procedure TForm1.DoLog(const ADesc: String; ADoLogLastResponse: Boolean);
var
  AStr: String;
begin
  :
  AStr := Format('[%s]: %s', [DateTimeToStr(Now), ADesc]);
  if ADoLogLastResponse then 
    AStr := AStr + Format('. Last response is "%s"', [GetLastResponseStr]);
  :  //saving AStr in file or memo 
end;

function TForm1.GetLastResponseStr: String;
var
  i: Integer;
begin
  Result := '';
  with id_IMAP.LastCmdResult.Text do
    for i := 0 to Count - 1 do
    begin
      if Result <> '' then Result := Result + #13#10;
      Result := Result + Strings[i];
    end;
end; 

```

I didn't get any response via this approach, Did I go to wrong way?