Fix handling of IMAP search strings

* lisp/gnus/gnus-search.el (gnus-search-imap-handle-string): This was
a misunderstanding of what `multibyte-string-p' means.  The check was
actually supposed to be whether the string was non-ascii or not.
This commit is contained in:
Eric Abrahamsen 2022-05-06 10:14:08 -07:00
parent b7e1176323
commit c57a6644ef

View file

@ -1337,7 +1337,11 @@ elements are present."
(cl-defmethod gnus-search-imap-handle-string ((engine gnus-search-imap)
(str string))
(with-slots (literal-plus) engine
(if (multibyte-string-p str)
;; TODO: Figure out how Exchange IMAP servers actually work. They
;; do not accept any CHARSET but US-ASCII, but they do report
;; Literal+ capability. So what do we do? Will quoted strings
;; always work?
(if (string-match-p "[^[:ascii:]]" str)
;; If LITERAL+ is available, use it and encode string as
;; UTF-8.
(if literal-plus