emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reporting UTF-8 related problems?


From: Kenichi Handa
Subject: Re: Reporting UTF-8 related problems?
Date: Wed, 14 Aug 2002 10:21:58 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Eli Zaretskii <address@hidden> writes:
> On Wed, 31 Jul 2002, Kenichi Handa wrote:

>>  So, how about calling xselect-convert-to-string with
>>  TARGET-TYPE nil in the latter case?  This can be done by
>>  adding one more arg LOCAL-REQUEST to x_get_local_selection.
>>  
>>  If the above analysis is correct, we can implement the
>>  rather sensitive/delicate code for handling string in
>>  lisp_data_to_selection_data and x_encode_text in Lisp, which
>>  makes the Emacs' reaction to selection request more flexible
>>  and also makes the future maintanance easier.
>>  
>>  What do you think?

> I think it's a good idea.

I've just committed this change.  I confirmed that this
works on X (now pasting from Emacs to UTF-8 xterm also
works), but I don't know if it doesn't break anything on
Windows/DOS.

2002-08-14  Kenichi Handa  <address@hidden>

        * select.el (xselect-convert-to-string): If TYPE is non-nil,
        encode the selection data string.  Always return cons of type and
        string.
        (selection-converter-alist): Add (UTF8_STRING .
        xselect-convert-to-string).

2002-08-14  Kenichi Handa  <address@hidden>

        * xselect.c (QUTF8_STRING): New variable.
        (symbol_to_x_atom): Pay attention to QUTF8_STRING.
        (x_atom_to_symbol): Likewise.
        (x_get_local_selection): New argument local_request.  If it is
        nonzero, call handler_fn with the second arg nil.
        (x_handle_selection_request): Call x_get_local_selection with
        local_request 0.
        (lisp_data_to_selection_data): Don't encode the string here.
        (Fx_get_selection_internal): Call x_get_local_selection with
        local_request 1.
        (syms_of_xselect): Intern and staticpro QUTF8_STRING.

        * xterm.c (x_term_init): Initialize dpyinfo->Xatom_UTF8_STRING.

        * xterm.h (struct x_display_info): New member Xatom_UTF8_STRING.

---
Ken'ichi HANDA
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]