From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Fran=E7ois?= Gannaz Newsgroups: gmane.emacs.help Subject: Copy/paste is erratic Date: Tue, 24 Jan 2006 11:59:05 +0100 Message-ID: <20060124105904.GA5496@free.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1138102426 10732 80.91.229.2 (24 Jan 2006 11:33:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2006 11:33:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 24 12:33:42 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F1MQ5-0003VF-6v for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Jan 2006 12:33:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1MSZ-0001iJ-Dr for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Jan 2006 06:35:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F1M70-0001FY-9S for help-gnu-emacs@gnu.org; Tue, 24 Jan 2006 06:13:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F1M2D-00081s-U7 for help-gnu-emacs@gnu.org; Tue, 24 Jan 2006 06:09:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1Lzn-0006tV-3c for help-gnu-emacs@gnu.org; Tue, 24 Jan 2006 06:05:55 -0500 Original-Received: from [194.158.96.208] (helo=relay-dv.club-internet.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F1M4g-0007G3-SB for help-gnu-emacs@gnu.org; Tue, 24 Jan 2006 06:10:59 -0500 Original-Received: from pandion (d01v-213-44-194-8.d4.club-internet.fr [213.44.194.8]) by relay-dv.club-internet.fr (Postfix) with ESMTP id 786FF2562C for ; Tue, 24 Jan 2006 12:01:26 +0100 (CET) Original-Received: from zamansky by pandion with local (Exim 4.52) id 1F1LtB-0001XU-PS for help-gnu-emacs@gnu.org; Tue, 24 Jan 2006 11:59:05 +0100 Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.5.11 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32815 Archived-At: System used : Emacs 21.4.1 (2005-03-17 customized by Debian) Debian GNU/Linux testing, with locale fr_FR@euro Short description : Copy/paste from and to Emacs of non-latin1 text is erratic. It depends on the application used (OK from scite, not with firefox or to scite). Is there a way to fix this with this version of emacs ? Does emacs-cvs behave differently ? Long description : I first tried to copy some kanji from firefox to emacs and only obtained question marks. Of course, I was in a unicode buffer, with mule-ucs loaded. But after evaluating this : (set-selection-coding-system 'utf-8) I could now use the mouse to copy from firefox to scite (GTK-based) then to emacs (scite even accepts text coming from firefox with different html encodings like utf-8 or shift-jis). But still "???" from FF to emacs for japanese texts, and even garbage with european texts. On the other side, selecting text in emacs and pasting in scite does nothing. But pasting from Emacs to firefox is OK for all the latin-1 characters. BTW, replacing firefox with opera changed nothing. After looking around on the web, I tried several emacs commands : (set-selection-coding-system 'utf-8) ; allows to paste text from scite (setq-default enable-multibyte-characters t) (setq locale-coding-system 'utf-8) (prefer-coding-system 'utf-8) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) (setq x-select-enable-clipboard t) ; allows to paste ascii in scite The only effect was to sometimes change question marks into \uXXXX. Pasting the character number isn't really what I long for. I even updated my X system from XFree 4.3 to X.org 6.8.2 with no result. I read somewhere that there is no standard declaration of an utf-8 content of the X clipboard, but I don't know if it is related. If someone knows a way to fix this, I would be glad to hear about it. If possible, I'd also like to understand a bit more this strange behaviour. How does emacs guess the encoding of the X clipboard ? How do other applications (e.g. GTK) do ? Is there a way to view the full content of the clipboard (including header) ? Any help would be appreciated. Thanks -- Fran=E7ois Gannaz