diff options
Diffstat (limited to 'lisp/select.el')
| -rw-r--r-- | lisp/select.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/select.el b/lisp/select.el index 01d1af6edf1..cbdeaf12fe3 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -223,8 +223,11 @@ Cut buffers are considered obsolete; you should use selections instead." | |||
| 223 | (setq str (encode-coding-string str coding)))) | 223 | (setq str (encode-coding-string str coding)))) |
| 224 | 224 | ||
| 225 | ((eq type 'UTF8_STRING) | 225 | ((eq type 'UTF8_STRING) |
| 226 | (setq str (encode-coding-string str 'utf-8))) | 226 | (let ((charsets (find-charset-string str))) |
| 227 | 227 | (if (or (memq 'eight-bit-control charsets) | |
| 228 | (memq 'eight-bit-graphic charsets)) | ||
| 229 | (setq type 'STRING) | ||
| 230 | (setq str (encode-coding-string str 'utf-8))))) | ||
| 228 | (t | 231 | (t |
| 229 | (error "Unknow selection type: %S" type)) | 232 | (error "Unknow selection type: %S" type)) |
| 230 | ))) | 233 | ))) |