From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Reporting UTF-8 related problems? Date: Wed, 14 Aug 2002 10:21:58 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200208140121.KAA27942@etlken.m17n.org> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1029288144 20724 127.0.0.1 (14 Aug 2002 01:22:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 14 Aug 2002 01:22:24 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17emrf-0005O9-00 for ; Wed, 14 Aug 2002 03:22:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17enGR-00051C-00 for ; Wed, 14 Aug 2002 03:47:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17emsY-0007XB-00; Tue, 13 Aug 2002 21:23:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17emrz-0007W3-00 for emacs-devel@gnu.org; Tue, 13 Aug 2002 21:22:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17emrU-0007V5-00 for emacs-devel@gnu.org; Tue, 13 Aug 2002 21:22:43 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17emrT-0007V0-00 for emacs-devel@gnu.org; Tue, 13 Aug 2002 21:22:11 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6/3.7W-20010518204228) with ESMTP id g7E1Lxl29492; Wed, 14 Aug 2002 10:21:59 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.3/3.7W-20010823150639) with ESMTP id g7E1Lw914977; Wed, 14 Aug 2002 10:21:58 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA27942; Wed, 14 Aug 2002 10:21:58 +0900 (JST) Original-To: eliz@is.elta.co.il, keichwa@gmx.net, schwab@suse.de In-Reply-To: (message from Eli Zaretskii on Thu, 1 Aug 2002 08:18:18 +0300 (IDT)) 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) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6518 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6518 In article , Eli Zaretskii 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 * 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 * 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 handa@etl.go.jp