diff options
Diffstat (limited to 'lisp/international')
| -rw-r--r-- | lisp/international/mule-cmds.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 27296ecfb2c..ecdab5e931d 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2913,13 +2913,13 @@ If there's no description string for VALUE, return nil." If CODING-SYSTEM can't safely encode CHAR, return nil. The 3rd optional argument CHARSET, if non-nil, is a charset preferred on encoding." - (let* ((str1 (string-as-multibyte (string char))) - (str2 (string-as-multibyte (string char char))) + (let* ((str1 (string char)) + (str2 (string char char)) (found (find-coding-systems-string str1)) enc1 enc2 i1 i2) - (if (and (consp found) - (eq (car found) 'undecided)) - str1 + (if (eq (car-safe found) 'undecided) ;Aka (not (multibyte-string-p str1)) + ;; `char' is ASCII. + (encode-coding-string str1 coding-system) (when (memq (coding-system-base coding-system) found) ;; We must find the encoded string of CHAR. But, just encoding ;; CHAR will put extra control sequences (usually to designate |
