diff options
author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2021-10-25 09:39:52 -0700 |
---|---|---|
committer | Eric Abrahamsen <eric@ericabrahamsen.net> | 2021-10-25 09:55:12 -0700 |
commit | e73b8ae86f09b34a65086641d693aea78e42fb25 (patch) | |
tree | 4a09a147371052d1600b51513de7928ac3588293 /lisp/gnus/gnus-search.el | |
parent | 33785495722f9f75cf50f7beabda8859399403d9 (diff) | |
download | emacs-e73b8ae86f09b34a65086641d693aea78e42fb25.tar.gz |
IMAP search should only use charset utf-8 with multibyte strings
Background: Exchange servers cannot accept "charset utf-8" search
strings. The code originally set that charset for any server with
literal+ capability, borking all searches on an Exchange server. This
code only sets utf-8 for multibyte search strings in particular, which
would be borken for Exchange anyway.
* lisp/gnus/gnus-search.el (gnus-search-imap-search-command): Ensure
we're only doing the literal+ dance for multibyte strings (multibyte
strings will have had newlines inserted in an earlier step).
Diffstat (limited to 'lisp/gnus/gnus-search.el')
-rw-r--r-- | lisp/gnus/gnus-search.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 9c83d5fa376..31573588046 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1084,7 +1084,8 @@ Responsible for handling and, or, and parenthetical expressions.") Currently takes into account support for the LITERAL+ capability. Other capabilities could be tested here." (with-slots (literal-plus) engine - (when literal-plus + (when (and literal-plus + (string-match-p "\n" query)) (setq query (split-string query "\n"))) (cond ((consp query) |