Search utf-8 string with Gmail X-GM-RAW IMAP command
问题 Gmail's imap extension command X-GM-RAW allows me to perform a search if I use a ascii query string. If utf-8 chars are used in the query, the imap returns bad response. https://developers.google.com/google-apps/gmail/imap_extensions#extension_of_the_search_command_x-gm-raw How should the utf-8 input string be encoded so that X-GM-RAW search will work fine. I do not want to loose the flexibility to search specific field like "subject" or "rfc833msgid" Thanks 回答1: Specify CHARSET UTF-8 and