This commit was generated by cvs2svn to compensate for changes in r377,
[elisp/tm.git] / tm-ew-e.el
index 4fceecd..f500554 100644 (file)
@@ -6,7 +6,7 @@
 ;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version: $Revision: 7.16 $
+;;; Version: $Revision: 7.18 $
 ;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -36,7 +36,7 @@
 ;;;
 
 (defconst tm-ew-e/RCS-ID
-  "$Id: tm-ew-e.el,v 7.16 1996/04/24 11:30:54 morioka Exp $")
+  "$Id: tm-ew-e.el,v 7.18 1996/05/09 18:08:47 morioka Exp $")
 (defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID))
 
 
        ret)
     (setq ret
          (cond ((equal encoding "B")
-                (setq string
-                      (mime/convert-string-from-emacs string charset))
+                (setq string (mime-charset-encode-string string charset))
                 (base64-length string)
                 )
                ((equal encoding "Q")
-                (setq string
-                      (mime/convert-string-from-emacs string charset))
+                (setq string (mime-charset-encode-string string charset))
                 (q-encoding-length string)
                 )))
     (if ret
            (t
             (setq string (car rword))
             (let* ((sl (length string))
-                   (p 0)
+                   (p 0) np
                    (str "") nstr)
               (while (and (< p len)
                           (progn
-                            (setq p (+ p (char-bytes (sref string p))))
-                            (setq nstr (substring string 0 p))
+                            (setq np (+ p (char-bytes (sref string p))))
+                            (setq nstr (substring string 0 np))
                             (setq ret (tm-eword::encoded-word-length
                                        (cons nstr (cdr rword))
                                        ))
                             (setq len (+ (car ret) column))
                             (<= len 76)
                             ))
-                (setq str nstr))
+                (setq str nstr
+                      p np))
               (if (string-equal str "")
                   (setq string "\n "
                         len 1)