[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e73b8ae: IMAP search should only use charset utf-8 with multibyte
From: |
Eric Abrahamsen |
Subject: |
master e73b8ae: IMAP search should only use charset utf-8 with multibyte strings |
Date: |
Mon, 25 Oct 2021 12:55:21 -0400 (EDT) |
branch: master
commit e73b8ae86f09b34a65086641d693aea78e42fb25
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
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).
---
lisp/gnus/gnus-search.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 9c83d5f..3157358 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e73b8ae: IMAP search should only use charset utf-8 with multibyte strings,
Eric Abrahamsen <=