'(typ, [data]) = search(charset, criterion, ...)
Search mailbox for matching messages.
If UTF8 is enabled, charset MUST be None.
\'data\' is space separated list of matching message numbers.'

def search(self, charset, *criteria, **kw):

    name = 'SEARCH'
    kw['untagged_response'] = name
    if charset:
        if self.utf8_enabled:
            raise self.error('Non-None    charset    not    valid    in    UTF8    mode')
        return self._simple_command(name, 'CHARSET', charset, *criteria, **kw)
    return self._simple_command(name, *criteria, **kw)
