mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Small puny.el fix
* lisp/net/puny.el (puny-decode-string-internal): Handle strings with no ascii parts. (Bug#23688)
This commit is contained in:
parent
8244357283
commit
8c1e16bee4
1 changed files with 6 additions and 4 deletions
|
|
@ -150,10 +150,12 @@ For instance \"xn--bcher-kva\" => \"bücher\"."
|
|||
(defun puny-decode-string-internal (string)
|
||||
(with-temp-buffer
|
||||
(insert string)
|
||||
(goto-char (point-max))
|
||||
(search-backward "-" nil (point-min))
|
||||
;; The encoded chars are after the final dash.
|
||||
(let ((encoded (buffer-substring (1+ (point)) (point-max)))
|
||||
;; The encoded chars are after any final dash, else the whole string.
|
||||
(let ((encoded (buffer-substring
|
||||
(if (search-backward "-" nil 'move)
|
||||
(1+ (point))
|
||||
(point))
|
||||
(point-max)))
|
||||
(ic 0)
|
||||
(i 0)
|
||||
(bias puny-initial-bias)
|
||||
|
|
|
|||
Loading…
Reference in a new issue