comparison lisp/international/utf-7.el @ 89476:651a752f98b2

(utf-7-decode, utf-7-encode): Use utf-16be, not utf-16-be.
author Kenichi Handa <handa@m17n.org>
date Sun, 22 Jun 2003 23:27:26 +0000
parents e25f0fe176b0
children
comparison
equal deleted inserted replaced
89475:d6468503c001 89476:651a752f98b2
76 (let ((pl (mod (- run-length) 4))) 76 (let ((pl (mod (- run-length) 4)))
77 (insert-char ?= pl) 77 (insert-char ?= pl)
78 (if imap 78 (if imap
79 (subst-char-in-region p (point) ?, ?/)) 79 (subst-char-in-region p (point) ?, ?/))
80 (base64-decode-region p (point))) 80 (base64-decode-region p (point)))
81 (decode-coding-region p (point) 'utf-16-be) 81 (decode-coding-region p (point) 'utf-16be)
82 (save-excursion 82 (save-excursion
83 (goto-char p) 83 (goto-char p)
84 (delete-backward-char 1))))))) 84 (delete-backward-char 1)))))))
85 (- (point-max) (point-min))))) 85 (- (point-max) (point-min)))))
86 86
118 (let ((p (point))) 118 (let ((p (point)))
119 (skip-chars-forward not-skip-chars) 119 (skip-chars-forward not-skip-chars)
120 (save-restriction 120 (save-restriction
121 ;; encode-coding-region doesn't preserve point 121 ;; encode-coding-region doesn't preserve point
122 (narrow-to-region p (point)) 122 (narrow-to-region p (point))
123 (encode-coding-region p (point-max) 'utf-16-be) 123 (encode-coding-region p (point-max) 'utf-16be)
124 (base64-encode-region p (point-max)) 124 (base64-encode-region p (point-max))
125 (if imap 125 (if imap
126 (subst-char-in-region p (point-max) ?/ ?,)) 126 (subst-char-in-region p (point-max) ?/ ?,))
127 (goto-char p) 127 (goto-char p)
128 ;; As I read the RFC, this isn't correct, but it's 128 ;; As I read the RFC, this isn't correct, but it's