comparison lisp/international/utf-7.el @ 80235:58e18c83bf75

(utf-7-encode): Never skip the trailing - for the `imap' variant.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 28 Feb 2008 19:43:51 +0000
parents b6fdfff4ae81
children 4054054dd212
comparison
equal deleted inserted replaced
80234:0a746c028341 80235:58e18c83bf75
124 (goto-char p) 124 (goto-char p)
125 ;; As I read the RFC, this isn't correct, but it's 125 ;; As I read the RFC, this isn't correct, but it's
126 ;; consistent with iconv, at least regarding `='. 126 ;; consistent with iconv, at least regarding `='.
127 (skip-chars-forward "^= \t\n") 127 (skip-chars-forward "^= \t\n")
128 (delete-region (point) (point-max)))) 128 (delete-region (point) (point-max))))
129 (unless (eobp) 129 ;; RFC2060 stipulates that all names MUST end in US-ASCII (i.e.
130 ;; a name that ends with a Unicode octet MUST end with a "-").
131 (if (or imap (not (eobp)))
130 (insert ?-))))) 132 (insert ?-)))))
131 nil)) 133 nil))
132 134
133 (defun utf-7-pre-write-conversion (from to) 135 (defun utf-7-pre-write-conversion (from to)
134 (utf-7-encode from to nil)) 136 (utf-7-encode from to nil))