From 71871d197c265b21132ffefbda8d6b83cfb850c6 Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 17 Apr 1998 02:27:33 +0000 Subject: [PATCH] (eword-encode-divide-into-charset-words): Use 'char-length or 'char-next-index instead of 'char-bytes. (tm-eword::encode-string-1): Use 'char-next-index instead of 'char-bytes. --- eword-encode.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eword-encode.el b/eword-encode.el index 2748d71..2a38ee3 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -119,13 +119,12 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (while (> len 0) (let* ((chr (sref string 0)) (charset (eword-encode-char-type chr)) - (i (char-bytes chr)) - ) + (i (char-length chr))) (while (and (< i len) (setq chr (sref string i)) (eq charset (eword-encode-char-type chr)) ) - (setq i (+ i (char-bytes chr))) + (setq i (char-next-index chr i)) ) (setq dest (cons (cons charset (substring string 0 i)) dest) string (substring string i) @@ -302,7 +301,7 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (str "") nstr) (while (and (< p len) (progn - (setq np (+ p (char-bytes (sref string p)))) + (setq np (char-next-index (sref string p) p)) (setq nstr (substring string 0 np)) (setq ret (tm-eword::encoded-word-length (cons nstr (cdr rword)) -- 1.7.10.4