From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: josh buhl Newsgroups: gmane.emacs.bugs Subject: Re: [uzs33d@uni-bonn.de: gtk2, iso14755, pasting non-ascii characters, and the x-windows clipboard] Date: Thu, 18 Dec 2003 10:50:25 +0100 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3FE17861.9090809@uni-bonn.de> References: <200312180215.LAA00397@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1071741120 17690 80.91.224.253 (18 Dec 2003 09:52:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2003 09:52:00 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 18 10:51:54 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AWup0-0002SE-00 for ; Thu, 18 Dec 2003 10:51:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AWvmD-0004tT-MW for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Dec 2003 05:53:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AWvm7-0004pd-Qq for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2003 05:52:59 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AWvlZ-0004e1-3W for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2003 05:52:56 -0500 Original-Received: from [131.220.99.37] (helo=mail.stw-bonn.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AWvlY-0004YH-5J for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2003 05:52:24 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.stw-bonn.de (Postfix) with ESMTP id E833BEF83C; Thu, 18 Dec 2003 10:50:25 +0100 (CET) Original-Received: from uni-bonn.de (port-192-168-82-198.dhcp.stw-bonn.de [192.168.82.198]) by mail.stw-bonn.de (Postfix) with ESMTP id 37125EF241; Thu, 18 Dec 2003 09:50:25 +0000 (/etc/localtime) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4; MultiZilla v1.4.0.4A) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en Original-To: Kenichi Handa In-Reply-To: <200312180215.LAA00397@etlken.m17n.org> X-Enigmail-Version: 0.76.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Virus-Scanned: by AMaViS X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6313 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6313 Kenichi Handa wrote: >>However, the gtk2 apps and the non-gtk2 apps aside from emacs, all >>seem to be able to paste this text in from each other properly. Only >>emacs has this problem. > > > Perhaps, that because the other apps use UTF8_STRING request > on selection (which is XFree86 extention) but Emacs 21.3 > uses only COMPOUND_TEXT request (standard of X). The latest > CVS version of Emacs supports UTF8_STRING. That sounds plausible. If I tried to checkout and compile the latest cvs of emacs to test this, would I have to somehow enable utf8_string, or would it be automatically supported? >>This behaviour is independent of what I've set LC_ALL to before >>starting emacs, but if I logout and login with default session >>language set to german, then all the pasting functions work properly. > > > ??? Then, in what locale were you running gtk2 apps when > pasting didn't work? The system default, which is no default language (as recommended during the debian locales configuration script for mult-language systems), so just POSIX: josh@spleen:~$ locale LANG=POSIX LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL= josh@spleen:~$ locale -a C de_DE de_DE@euro de_DE.iso88591 de_DE.iso885915@euro de_DE.utf8 de_DE.utf8@euro deutsch en_US en_US.iso88591 en_US.utf8 german POSIX josh@spleen:~$ But like I said, I can open a terminal, set LC_ALL=en_US.utf8, start emacs, and the pasting does not work (but only for emacs, it still works with other apps). *HOWEVER*, if I log out, select any of the available locales for the session language in the gdm login, e.g. de_DE.ISO-8859-1 or en_US.UTF-8, and then login, then all the pasting works properly. I suppose that the session locale setting might also alter the way the X selection buffer deals with the marked text. >>The garbaged text corresponds exactly to the unicode hex encodings for >>the characters. for example the unicode hex encoding of ß is 00DF and >>emacs displays the pasted in ß as \x{00DF}. This certainly isn't a >>coincidence. > > > Emacs never generates such \x{.....} notation automatically. > So, the text should be generated on sender site. This corroborates the suggestion that the session locale setting is also effecting the text in the x selection buffer. But there's still the question (except for your utf8-string explanation) of why other apps can insert this, but emacs can't. -jb