;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Revision: 0.19 $
+;; Version: $Revision: 0.20 $
;; Keywords: encoded-word, MIME, multilingual, header, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
;;;
(defconst eword-encode-RCS-ID
- "$Id: eword-encode.el,v 0.19 1997-06-21 13:47:35 morioka Exp $")
+ "$Id: eword-encode.el,v 0.20 1997-06-21 14:25:21 morioka Exp $")
(defconst eword-encode-version (get-version-string eword-encode-RCS-ID))
(char-charset character)
))
-(defun tm-eword::parse-lc-word (str)
- (let* ((chr (sref str 0))
- (lc (eword-encode-char-type chr))
- (i (char-bytes chr))
- (len (length str))
- )
- (while (and (< i len)
- (setq chr (sref str i))
- (eq lc (eword-encode-char-type chr))
- )
- (setq i (+ i (char-bytes chr)))
- )
- (cons (cons lc (substring str 0 i)) (substring str i))
- ))
-
(defun tm-eword::split-to-lc-words (str)
(let (ret dest)
- (while (and (not (string= str ""))
- (setq ret (tm-eword::parse-lc-word str))
- )
- (setq dest (cons (car ret) dest))
- (setq str (cdr ret))
- )
+ (while (not (string= str ""))
+ (let* ((chr (sref str 0))
+ (charset (eword-encode-char-type chr))
+ (i (char-bytes chr))
+ (len (length str))
+ )
+ (while (and (< i len)
+ (setq chr (sref str i))
+ (eq charset (eword-encode-char-type chr))
+ )
+ (setq i (+ i (char-bytes chr)))
+ )
+ (setq dest (cons (cons charset (substring str 0 i)) dest)
+ str (substring str i))
+ ))
(reverse dest)
))