diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2006-09-16 17:12:38 +0000 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2006-09-16 17:12:38 +0000 |
commit | b984fed926ff00c7468acc0f6f4b0fc1ad6c72be (patch) | |
tree | f57260feb43a41e95a2dbf796547dbd419ddad67 /lisp/select.el | |
parent | 6875fe9ae6a55d6323839fd09b3624afeab77524 (diff) | |
download | emacs-b984fed926ff00c7468acc0f6f4b0fc1ad6c72be.tar.gz |
* select.el (xselect-convert-to-string): If UTF8_STRING is requested
and the data doesn't look like UTF8, send STRING instead.
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." (setq str (encode-coding-string str coding)))) ((eq type 'UTF8_STRING) - (setq str (encode-coding-string str 'utf-8))) - + (let ((charsets (find-charset-string str))) + (if (or (memq 'eight-bit-control charsets) + (memq 'eight-bit-graphic charsets)) + (setq type 'STRING) + (setq str (encode-coding-string str 'utf-8))))) (t (error "Unknow selection type: %S" type)) ))) |