(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)
(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))