From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: 63332@debbugs.gnu.org
Subject: bug#63332: Acknowledgement (28.2.50; pop3.el does not support UTF-8 (RFC 6856))
Date: Sat, 06 May 2023 19:26:40 +0200 [thread overview]
Message-ID: <87sfc95q27.fsf@turtle-trading.net> (raw)
In-Reply-To: <handler.63332.B.168339373129726.ack@debbugs.gnu.org> (GNU bug Tracking System's message of "Sat, 06 May 2023 17:23:02 +0000")
[-- Attachment #1: Type: text/plain, Size: 62 bytes --]
With bug number and ignore-error*s* instead of ignore-error.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Support-RFC-6856-bug-63332.patch --]
[-- Type: text/x-diff, Size: 1501 bytes --]
From 8af24a0d39f5104615cafd45af30fd5765108197 Mon Sep 17 00:00:00 2001
From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Date: Sat, 6 May 2023 19:06:06 +0200
Subject: [PATCH] Support RFC 6856 (bug#63332)
* lisp/net/pop3.el (pop3-open-server): Send "UTF8" when needed.
---
lisp/net/pop3.el | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el
index d2fdbc3ffff..aacb96dc5ec 100644
--- a/lisp/net/pop3.el
+++ b/lisp/net/pop3.el
@@ -551,13 +551,20 @@ pop3-open-server
(and (string-match "\\bSTLS\\b" capabilities)
"STLS\r\n"))))
(when result
- (let ((response (plist-get (cdr result) :greeting)))
+ (let* ((process (car result))
+ (properties (cdr result))
+ (response (plist-get properties :greeting))
+ (capabilities (plist-get properties :capabilities)))
(setq pop3-timestamp
(substring response (or (string-search "<" response) 0)
- (+ 1 (or (string-search ">" response) -1)))))
- (set-process-query-on-exit-flag (car result) nil)
- (erase-buffer)
- (car result)))))
+ (+ 1 (or (string-search ">" response) -1))))
+ (set-process-query-on-exit-flag process nil)
+ (erase-buffer)
+ ;; Support RFC 6856.
+ (when (string-match "\\bUTF8\\b" capabilities)
+ (pop3-send-command process "UTF8")
+ (ignore-errors (pop3-read-response process)))
+ process)))))
;; Support functions
--
2.30.2
prev parent reply other threads:[~2023-05-06 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 17:21 bug#63332: 28.2.50; pop3.el does not support UTF-8 (RFC 6856) Benjamin Riefenstahl
[not found] ` <handler.63332.B.168339373129726.ack@debbugs.gnu.org>
2023-05-06 17:26 ` Benjamin Riefenstahl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sfc95q27.fsf@turtle-trading.net \
--to=b.riefenstahl@turtle-trading.net \
--cc=63332@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).