aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2007-07-25 00:54:44 +0000
committerKenichi Handa2007-07-25 00:54:44 +0000
commit80f462b754a32ca4a059919cf2344793ec9eee29 (patch)
treee173ff9da516c6abc7f76c5b455135280b14a0ba
parentd7e69846bb8082943f3aa3cdf76527765240577d (diff)
downloademacs-80f462b754a32ca4a059919cf2344793ec9eee29.tar.gz
emacs-80f462b754a32ca4a059919cf2344793ec9eee29.zip
(webjump-url-encode): Fix for non-ASCII characters.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/webjump.el14
2 files changed, 11 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e30db6c7029..15732e651c6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-07-25 William Xu <william.xwl@gmail.com> (tiny change)
2
3 * net/webjump.el (webjump-url-encode): Fix for non-ASCII
4 characters.
5
12007-07-24 Dan Nicolaescu <dann@ics.uci.edu> 62007-07-24 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * dired.el (dired-mode-map): Bind wdired-change-to-wdired-mode to 8 * dired.el (dired-mode-map): Bind wdired-change-to-wdired-mode to
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 03ce6305196..0b04c8f2f40 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -451,14 +451,12 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
451 451
452(defun webjump-url-encode (str) 452(defun webjump-url-encode (str)
453 (mapconcat '(lambda (c) 453 (mapconcat '(lambda (c)
454 (cond ((= c 32) "+") 454 (let ((s (char-to-string c)))
455 ((or (and (>= c ?a) (<= c ?z)) 455 (cond ((string= s " ") "+")
456 (and (>= c ?A) (<= c ?Z)) 456 ((string-match "[a-zA-Z_.-/]" s) s)
457 (and (>= c ?0) (<= c ?9))) 457 (t (upcase (format "%%%02x" c))))))
458 (char-to-string c)) 458 (encode-coding-string str 'utf-8)
459 (t (upcase (format "%%%02x" c))))) 459 ""))
460 str
461 ""))
462 460
463(defun webjump-url-fix (url) 461(defun webjump-url-fix (url)
464 (if (webjump-null-or-blank-string-p url) 462 (if (webjump-null-or-blank-string-p url)