From: LdBeth <andpuke@foxmail.com>
To: 52792@debbugs.gnu.org
Subject: bug#52792: 27.2; please don't hardcode utf-8 when fetching group list
Date: Sun, 26 Dec 2021 10:00:42 +0800 [thread overview]
Message-ID: <tencent_03F53C61E4EB9C58CDFE99B951775739820A@qq.com> (raw)
In-Reply-To: <tencent_EA8EFF0EDD00BA5D1DC97A2231047414AD09@qq.com>
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
This patch that reverts only related changes (and does nothing else)
in cb12a84f2c519a48dd87453c925e3bc36d9944db should make Gnus works
again for none utf-8 NNTP servers.
[-- Attachment #2: revert.diff --]
[-- Type: text/plain, Size: 1263 bytes --]
--- gnus-srvr.el.old 2021-12-26 09:48:28.000000000 +0800
+++ gnus-srvr.el 2021-12-26 09:55:45.000000000 +0800
@@ -784,13 +784,11 @@
(while (not (eobp))
(ignore-errors
(push (cons
- (decode-coding-string
(buffer-substring
(point)
(progn
(skip-chars-forward "^ \t")
(point)))
- 'utf-8-emacs)
(let ((last (read cur)))
(cons (read cur) last)))
groups))
@@ -798,7 +796,6 @@
(while (not (eobp))
(ignore-errors
(push (cons
- (decode-coding-string
(if (eq (char-after) ?\")
(read cur)
(let ((p (point)) (name ""))
@@ -811,7 +808,6 @@
(setq name (concat name (buffer-substring
p (point)))))
name))
- 'utf-8-emacs)
(let ((last (read cur)))
(cons (read cur) last)))
groups))
@@ -863,7 +859,12 @@
((= level gnus-level-zombie) ?Z)
(t ?K)))
(max 0 (- (1+ (cddr group)) (cadr group)))
- name)))
+ ;; Don't decode if name is ASCII
+ (if (eq (detect-coding-string name t) 'undecided)
+ name
+ (decode-coding-string
+ name
+ (inline (gnus-group-name-charset method name)))))))
(list 'gnus-group name)
)))
(switch-to-buffer (current-buffer)))
next prev parent reply other threads:[~2021-12-26 2:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-25 16:19 bug#52792: 27.2; please don't hardcode utf-8 when fetching group list LdBeth
2021-12-26 2:00 ` LdBeth [this message]
2021-12-26 2:25 ` LdBeth
2021-12-26 7:00 ` Eli Zaretskii
2021-12-26 9:49 ` LdBeth
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=tencent_03F53C61E4EB9C58CDFE99B951775739820A@qq.com \
--to=andpuke@foxmail.com \
--cc=52792@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).