projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* dns.el (network-interface-list): Define for XEmacs.
[gnus]
/
lisp
/
utf7.el
diff --git
a/lisp/utf7.el
b/lisp/utf7.el
index
cca647d
..
f48ae87
100644
(file)
--- a/
lisp/utf7.el
+++ b/
lisp/utf7.el
@@
-1,7
+1,6
@@
-;;; utf7.el --- UTF-7 encoding/decoding for Emacs -*-coding:
iso-8859-1
;-*-
+;;; utf7.el --- UTF-7 encoding/decoding for Emacs -*-coding:
utf-8
;-*-
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
;; Author: Jon K Hellan <hellan@acm.org>
;; Maintainer: bugs@gnus.org
;; Author: Jon K Hellan <hellan@acm.org>
;; Maintainer: bugs@gnus.org
@@
-53,10
+52,10
@@
;; necessary coding system. The code below doesn't seem to DTRT
;; generally. E.g.:
;;
;; necessary coding system. The code below doesn't seem to DTRT
;; generally. E.g.:
;;
-;; (utf7-encode "a+£")
+;; (utf7-encode "a+
Â
£")
;; => "a+ACsAow-"
;;
;; => "a+ACsAow-"
;;
-;; $ echo "a+
£"|iconv -f iso-8859-1
-t utf-7
+;; $ echo "a+
£"|iconv -f utf-8
-t utf-7
;; a+-+AKM
;;
;; -- fx
;; a+-+AKM
;;
;; -- fx
@@
-78,7
+77,7
@@
(defconst utf7-utf-16-coding-system
(cond ((mm-coding-system-p 'utf-16-be-no-signature) ; Mule-UCS
'utf-16-be-no-signature)
(defconst utf7-utf-16-coding-system
(cond ((mm-coding-system-p 'utf-16-be-no-signature) ; Mule-UCS
'utf-16-be-no-signature)
- ((and (mm-coding-system-p 'utf-16-be) ; Emacs
21.3, Emacs 22
+ ((and (mm-coding-system-p 'utf-16-be) ; Emacs
;; Avoid versions with BOM.
(= 2 (length (encode-coding-string "a" 'utf-16-be))))
'utf-16-be)
;; Avoid versions with BOM.
(= 2 (length (encode-coding-string "a" 'utf-16-be))))
'utf-16-be)
@@
-205,6
+204,7
@@
Characters are in raw byte pairs in narrowed buffer."
(mm-decode-coding-region (point-min) (point-max) 'iso-8859-1)
(mm-enable-multibyte))
(mm-decode-coding-region (point-min) (point-max) 'iso-8859-1)
(mm-enable-multibyte))
+;;;###autoload
(defun utf7-encode (string &optional for-imap)
"Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil."
(if (and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))
(defun utf7-encode (string &optional for-imap)
"Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil."
(if (and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))