From: Reuben Thomas <rrt@sc3d.org>
Date: Tue, 22 Aug 2017 01:51:53 +0100
;; Return a string decoded from Nth element of the current dictionary.
(defun ispell-get-decoded-string (n)
"Get the decoded string in slot N of the descriptor of the current dict."
(let* ((slot (or
(assoc ispell-current-dictionary ispell-local-dictionary-alist)
(assoc ispell-current-dictionary ispell-dictionary-alist)
- (error "No data for dictionary \"%s\", neither in `ispell-local-dictionary-alist' nor in `ispell-dictionary-alist'"
- ispell-current-dictionary)))
- (str (nth n slot)))
- (when (and (> (length str) 0)
- (not (multibyte-string-p str)))
- (setq str (ispell-decode-string str))
- (or (multibyte-string-p str)
- (setq str (string-to-multibyte str))))
Are you sure we don't need to ensure ispell-get-decoded-string always
returns a multibyte string? What if decode-coding-string returns a
pure ASCII string, which is therefore unibyte?