Mercurial > emacs
changeset 85926:025d69230a9b
(utf-7-imap): New coding system.
(utf-7-imap-post-read-conversion): New function.
(utf-7-imap-pre-write-conversion): New function.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 05 Nov 2007 06:44:32 +0000 |
parents | a1a283c3bfd3 |
children | a049b211cf27 |
files | lisp/international/utf-7.el |
diffstat | 1 files changed, 12 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/utf-7.el Mon Nov 05 04:28:32 2007 +0000 +++ b/lisp/international/utf-7.el Mon Nov 05 06:44:32 2007 +0000 @@ -46,13 +46,14 @@ (pre-write-conversion . utf-7-pre-write-conversion) (post-read-conversion . utf-7-post-read-conversion))) -;; (make-coding-system -;; 'utf-7-imap 0 ?u -;; "UTF-7 encoding of Unicode, IMAP version (RFC 2060)" -;; nil -;; `((safe-chars . ,(coding-system-get 'utf-16be 'safe-chars)) -;; (pre-write-conversion . utf-7-imap-pre-write-conversion) -;; (post-read-conversion . utf-7-imap-post-read-conversion))) +;;;###autoload(autoload-coding-system 'utf-7-imap '(require 'utf-7)) +(make-coding-system + 'utf-7-imap 0 ?u + "UTF-7 encoding of Unicode, IMAP version (RFC 2060)" + nil + `((safe-chars . ,(coding-system-get 'utf-16be 'safe-chars)) + (pre-write-conversion . utf-7-imap-pre-write-conversion) + (post-read-conversion . utf-7-imap-post-read-conversion))) (defun utf-7-decode (len imap) "Decode LEN bytes of UTF-7 at point. @@ -85,8 +86,8 @@ (defun utf-7-post-read-conversion (len) (utf-7-decode len nil)) -;; (defun utf-7-imap-post-read-conversion (len) -;; (utf-7-decode len t)) +(defun utf-7-imap-post-read-conversion (len) + (utf-7-decode len t)) (defun utf-7-encode (from to imap) "Encode bytes between FROM and TO to UTF-7. @@ -133,8 +134,8 @@ (defun utf-7-pre-write-conversion (from to) (utf-7-encode from to nil)) -;; (defun utf-7-imap-pre-write-conversion (from to) -;; (utf-7-encode from to t)) +(defun utf-7-imap-pre-write-conversion (from to) + (utf-7-encode from to t)) (provide 'utf-7)