aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2015-12-29 00:07:50 +0100
committerLars Ingebrigtsen2015-12-29 00:07:50 +0100
commit341feb3a26a0277f535217f4919b23eb70e3680e (patch)
tree7585f2c2f2504d7998166e2e63abcdc51d3b9558
parent1efc5f8b09273c359683ce13be95fb5df7a84311 (diff)
downloademacs-341feb3a26a0277f535217f4919b23eb70e3680e.tar.gz
emacs-341feb3a26a0277f535217f4919b23eb70e3680e.zip
Fix puny-encoding all-non-ASCII domains
* puny.el (puny-encode-string): Fix the all-non-ASCII encoding case.
-rw-r--r--lisp/net/puny.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/net/puny.el b/lisp/net/puny.el
index a16e3a07706..d96c6c22196 100644
--- a/lisp/net/puny.el
+++ b/lisp/net/puny.el
@@ -47,7 +47,11 @@ For instance, \"bücher\" => \"xn--bcher-kva\"."
47 string))) 47 string)))
48 (if (= (length ascii) (length string)) 48 (if (= (length ascii) (length string))
49 string 49 string
50 (concat "xn--" ascii "-" (puny-encode-complex (length ascii) string))))) 50 (concat "xn--"
51 (if (null ascii)
52 ""
53 (concat ascii "-"))
54 (puny-encode-complex (length ascii) string)))))
51 55
52(defun puny-decode-domain (domain) 56(defun puny-decode-domain (domain)
53 "Decode DOMAIN according to the IDNA/punycode algorith. 57 "Decode DOMAIN according to the IDNA/punycode algorith.