emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] A patch to Support filename encoding other than iso


From: Li Daobing
Subject: [emacs-wiki-discuss] A patch to Support filename encoding other than iso-8859-1
Date: Thu, 10 Feb 2005 05:00:12 +0800

you can access this patch from 
http://lidaobing.gnway.net/~nichloas/archives/address@hidden/emacs-wiki/

--- orig/emacs-wiki-publish.el
+++ mod/emacs-wiki-publish.el
@@ -1231,6 +1231,11 @@
       (delete-char -1)
       (insert "&")))))

+(defcustom emacs-wiki-publish-url-coding-system 'utf-8
+  "*Default coding system used to encode url strings"
+  :group 'emacs-wiki-publish
+  :type '(coding-system :size 0))
+
 ;; Copied from w3m-url-encode-string (w3m.el)
 (defun emacs-wiki-escape-url (str &optional coding)
   "Hexify dangerous characters in STR.
@@ -1250,7 +1255,11 @@
                (t
                 (format "%%%02x" ch)))) ; escape
             ;; Coerce a string to a list of chars.
-            (string-to-list str)))))
+           (append (encode-coding-string str
+                                       (or coding
+                                           emacs-wiki-publish-url-coding-system
+                                           'utf-8))
+                 nil)))))

 ;; we currently only do this on links. this means a stray '&' in an
 ;; emacs-wiki document risks being misinterpreted when being




reply via email to

[Prev in Thread] Current Thread [Next in Thread]