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: non-ASCII cut/paste emacs <-> mozilla Date: Tue, 16 Jul 2002 22:07:03 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200207161307.WAA13454@etlken.m17n.org> 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 1026824908 17651 127.0.0.1 (16 Jul 2002 13:08:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2002 13:08:28 +0000 (UTC) Cc: eliz@is.elta.co.il, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17US42-0004aa-00 for ; Tue, 16 Jul 2002 15:08:26 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17USEy-0006Uk-00 for ; Tue, 16 Jul 2002 15:19:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17US3u-0002cx-00; Tue, 16 Jul 2002 09:08:18 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17US2k-0002aR-00; Tue, 16 Jul 2002 09:07:07 -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 g6GD73l21810; Tue, 16 Jul 2002 22:07:03 +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 g6GD73913522; Tue, 16 Jul 2002 22:07:03 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id WAA13454; Tue, 16 Jul 2002 22:07:03 +0900 (JST) Original-To: miles@gnu.org In-Reply-To: message from Miles Bader on 16 Jul 2002 13:55:00 +0900 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:5781 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5781 Miles Bader writes: > Eli Zaretskii writes: >> > So mozilla is apparently just pasting the raw encoded >> > characters from X, without interpretation. >> >> Yes, it looks like a ctext-encoded string. You can verify that by >> setting a breakpoint in x_encode_text and looking at the string it is >> about to send to X. >> >> Weird. What system is that? > Debian unstable. > It seems as if it's just mozilla's problem, but I'm rather astonished > that it can't even deal with latin-1 characters. > Has anyone out there successfully used Mozilla to cut/paste non-ASCII text? > Also, does anyone know of any low-level tools that cat be used to > directly send/receive binary data to/from the X cut buffer mechanism, so > I can reduce the variables to one program? Run Emacs under gdb and set breakpoints at selection_data_to_lisp_data and lisp_data_to_selection_data, then see how bytes are decoded/encoded. At least, with this Mozilla: Mozilla 1.0 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3 I found very strange behavour. It seems that Mozilla is very sensitive to locale. If you run Mozilla under LANG=ja_JP.eucjp, you can copy&paste Japanese text with Emacs correctly. But, in that case, if you copy&paste latin-1 from Mozilla to Emacs, Mozilla encode latin-1 by euc-jp while treating all latin-1 chars as JISX0212. Thus, in that case, before pasting the characters into Emacs, you must do C-x C-m X euc-jp RET. And if you run Mozilla under LANG=de_DE, Mozilla correctly handles latin-1, but doesn't handle Japanese characters at all in copy&paste even if they are displayed correctly. If you run Mozilla under LANG=C, Mozilla doesn't handle latin-1 nor japanese characters in copy&paste. --- Ken'ichi HANDA handa@etl.go.jp