diff options
author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2019-04-23 20:32:02 -0700 |
---|---|---|
committer | Eric Abrahamsen <eric@ericabrahamsen.net> | 2019-04-23 20:32:02 -0700 |
commit | 3460502128ab6ac4b68d9b5dce5d1602547e7d67 (patch) | |
tree | 61f24c22ef54444788c4236c2c368198c131e3a3 | |
parent | 39f53f4dd93b2e6d550d8ef66af01eb971b34d81 (diff) | |
download | emacs-3460502128ab6ac4b68d9b5dce5d1602547e7d67.tar.gz |
Decode Gnus group names when browsing server group lists
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): The coding
system for the nntp-server-buffer is 'binary; decode group names as
'utf-8-emacs.
-rw-r--r-- | lisp/gnus/gnus-srvr.el | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 2328f1da163..da110c8bbfa 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -784,11 +784,13 @@ claim them." (while (not (eobp)) (ignore-errors (push (cons - (buffer-substring - (point) - (progn - (skip-chars-forward "^ \t") - (point))) + (decode-coding-string + (buffer-substring + (point) + (progn + (skip-chars-forward "^ \t") + (point))) + 'utf-8-emacs) (let ((last (read cur))) (cons (read cur) last))) groups)) @@ -796,18 +798,20 @@ claim them." (while (not (eobp)) (ignore-errors (push (cons - (if (eq (char-after) ?\") - (read cur) - (let ((p (point)) (name "")) - (skip-chars-forward "^ \t\\\\") - (setq name (buffer-substring p (point))) - (while (eq (char-after) ?\\) - (setq p (1+ (point))) - (forward-char 2) - (skip-chars-forward "^ \t\\\\") - (setq name (concat name (buffer-substring - p (point))))) - name)) + (decode-coding-string + (if (eq (char-after) ?\") + (read cur) + (let ((p (point)) (name "")) + (skip-chars-forward "^ \t\\\\") + (setq name (buffer-substring p (point))) + (while (eq (char-after) ?\\) + (setq p (1+ (point))) + (forward-char 2) + (skip-chars-forward "^ \t\\\\") + (setq name (concat name (buffer-substring + p (point))))) + name)) + 'utf-8-emacs) (let ((last (read cur))) (cons (read cur) last))) groups)) |