Hi,
On line ~283
$charset ||= 'UTF-8';
_string_quote($charset);
Is _string_quote necessary? It seems to break SORT on our imap server:
SORT (REVERSE DATE) "UTF-8" (SINCE 20-May-2012)
(causes the server to ignore the SEARCH criteria completely and return all messages).
If I modify the code to not _string_quote, then it works as expected.
SORT (REVERSE DATE) UTF-8 (SINCE 20-May-2012)
The RFC seems to suggest that it's not needed:
http://tools.ietf.org/html/rfc5256
Example: C: A282 SORT (SUBJECT) UTF-8 SINCE 1-Feb-1994
Thanks,
Deepak