Commit 34605021 authored by Eric Abrahamsen's avatar Eric Abrahamsen

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.
parent 39f53f4d
Pipeline #1432 passed with stage
in 54 minutes and 31 seconds
...@@ -784,11 +784,13 @@ claim them." ...@@ -784,11 +784,13 @@ claim them."
(while (not (eobp)) (while (not (eobp))
(ignore-errors (ignore-errors
(push (cons (push (cons
(buffer-substring (decode-coding-string
(point) (buffer-substring
(progn (point)
(skip-chars-forward "^ \t") (progn
(point))) (skip-chars-forward "^ \t")
(point)))
'utf-8-emacs)
(let ((last (read cur))) (let ((last (read cur)))
(cons (read cur) last))) (cons (read cur) last)))
groups)) groups))
...@@ -796,18 +798,20 @@ claim them." ...@@ -796,18 +798,20 @@ claim them."
(while (not (eobp)) (while (not (eobp))
(ignore-errors (ignore-errors
(push (cons (push (cons
(if (eq (char-after) ?\") (decode-coding-string
(read cur) (if (eq (char-after) ?\")
(let ((p (point)) (name "")) (read cur)
(skip-chars-forward "^ \t\\\\") (let ((p (point)) (name ""))
(setq name (buffer-substring p (point))) (skip-chars-forward "^ \t\\\\")
(while (eq (char-after) ?\\) (setq name (buffer-substring p (point)))
(setq p (1+ (point))) (while (eq (char-after) ?\\)
(forward-char 2) (setq p (1+ (point)))
(skip-chars-forward "^ \t\\\\") (forward-char 2)
(setq name (concat name (buffer-substring (skip-chars-forward "^ \t\\\\")
p (point))))) (setq name (concat name (buffer-substring
name)) p (point)))))
name))
'utf-8-emacs)
(let ((last (read cur))) (let ((last (read cur)))
(cons (read cur) last))) (cons (read cur) last)))
groups)) groups))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment