+2000-07-21 Kenichi Handa <handa@etl.go.jp>
+
+ * xfns.c (x_encode_text): New function.
+ (x_set_name): Use x_encode_text.
+ (x_set_title): Likewise.
+
+ * xselect.c (lisp_data_to_selection_data): Use x_encode_text.
+
+ * xterm.h (x_encode_text): Add prototype.
+
2000-07-20 Dave Love <fx@gnu.org>
* ccl.c (Fccl_execute_on_string): Don't check xmalloc return. Use
{
XTextProperty text, icon;
int bytes, stringp;
+ Lisp_Object coding_system;
- text.value = x_encode_text (name, Qcompound_text, &bytes, &stringp);
+ coding_system = Vlocale_coding_system;
+ if (NILP (coding_system))
+ coding_system = Qcompound_text;
+ text.value = x_encode_text (name, coding_system, &bytes, &stringp);
text.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8;
}
else
{
- icon.value = x_encode_text (f->icon_name, Qcompound_text,
+ icon.value = x_encode_text (f->icon_name, coding_system,
&bytes, &stringp);
icon.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
{
XTextProperty text, icon;
int bytes, stringp;
+ Lisp_Object coding_system;
- text.value = x_encode_text (name, Qcompound_text, &bytes, &stringp);
+ coding_system = Vlocale_coding_system;
+ if (NILP (coding_system))
+ coding_system = Qcompound_text;
+ text.value = x_encode_text (name, coding_system, &bytes, &stringp);
text.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8;
}
else
{
- icon.value = x_encode_text (f->icon_name, Qcompound_text,
+ icon.value = x_encode_text (f->icon_name, coding_system,
&bytes, &stringp);
icon.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
{
/* Since we are now handling multilingual text, we must consider
sending back compound text. */
- int latin1_p;
+ int stringp;
if (NILP (Vnext_selection_coding_system))
Vnext_selection_coding_system = Vselection_coding_system;
*format_ret = 8;
*data_ret = x_encode_text (obj, Vnext_selection_coding_system,
- (int *) size_ret, &latin1_p);
+ (int *) size_ret, &stringp);
*nofree_ret = (*data_ret == XSTRING (obj)->data);
if (NILP (type))
- type = (latin1_p ? QSTRING : QCOMPOUND_TEXT);
+ type = (stringp ? QSTRING : QCOMPOUND_TEXT);
Vlast_coding_system_used = (*nofree_ret
? Qraw_text
: Vnext_selection_coding_system);