and the data doesn't look like UTF8, send STRING instead.
+2006-09-16 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
+
+ * select.el (xselect-convert-to-string): If UTF8_STRING is requested
+ and the data doesn't look like UTF8, send STRING instead.
+
2006-09-16 Agustin Martin <agustin.martin@hispalinux.es>
* textmodes/flyspell.el (flyspell-check-region-doublons): New
(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))
)))