In article <[EMAIL PROTECTED]>, Juri Linkov <[EMAIL PROTECTED]> writes: > Now a new problem was uncovered: after selecting a correct word from > a list of near misses returned from ispell, ispell.el replaces the > misspelled word with a selected word, and inserts it into the buffer > not in its original mule-unicode charset, but in iso8859.
Perhaps the following function can be utilized somewhere in ispell to do that, but, as I still don't understand ispell code that much, I'd like to ask someone else to modify ispell to use it. ;; Destructively modify WORD by converting each character in it to the ;; equivalent character of CHARSET. (defun ispell-adjust-charset (word charset) (let ((len (length word))) (if (< len (string-bytes word)) (dotimes (i len) (let ((c (aref word i)) this-charset equiv-chars) (if (and (>= c 128) (not (eq (setq this-charset (char-charset c)) charset)) (or (memq this-charset '(mule-unicode-0100-24ff mule-unicode-2500-34ff)) (setq c (aref ucs-mule-8859-to-mule-unicode c))) (setq equivs (aref ispell-unified-chars-table c))) (catch 'tag (dotimes (j (length equiv-chars)) (when (eq (char-charset (aref equiv-chars j)) charset) (aset word i (aref equiv-chars j)) (throw 'tag nil)))))))))) --- Ken'ichi HANDA [EMAIL PROTECTED] PS. I personally feel it's a waste of time to struggle with charset matters in ispell that much because emacs-unicode should not have such a problem. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]