From: Kenichi Handa Date: Mon, 14 Feb 2005 00:59:42 +0000 (+0000) Subject: (lisp_data_to_selection_data): If OBJ is a non-ASCII X-Git-Tag: ttn-vms-21-2-B4~2316 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1bd70c6e1d8bf8c2a02d68efd0fe8b4fa9bef60d;p=emacs.git (lisp_data_to_selection_data): If OBJ is a non-ASCII multibyte string, signal an error instead of aborting. --- diff --git a/src/xselect.c b/src/xselect.c index bf37cde4d0b..8d8efd8db8a 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1908,7 +1908,12 @@ lisp_data_to_selection_data (display, obj, } else if (STRINGP (obj)) { - xassert (! STRING_MULTIBYTE (obj)); + if (SCHARS (obj) < SBYTES (obj)) + /* OBJ is a multibyte string containing a non-ASCII char. */ + Fsignal (Qerror, /* Qselection_error */ + Fcons (build_string + ("Non-ASCII string must be encoded in advance"), + Fcons (obj, Qnil))); if (NILP (type)) type = QSTRING; *format_ret = 8;