From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Cut buffers and character encoding Date: Sat, 11 Nov 2006 21:40:32 +0900 Message-ID: References: <87y7qldq6h.fsf@pacem.orebokech.com> <45537D3A.5080400@swipnet.se> <87mz70730i.fsf@pacem.orebokech.com> <45542D63.5070402@swipnet.se> <87irhn1kvk.fsf@pacem.orebokech.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1163248822 6297 80.91.229.2 (11 Nov 2006 12:40:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Nov 2006 12:40:22 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 11 13:40:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gis9h-0003up-OF for ged-emacs-devel@m.gmane.org; Sat, 11 Nov 2006 13:40:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gis9h-0001Mh-8g for ged-emacs-devel@m.gmane.org; Sat, 11 Nov 2006 07:40:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gis9Q-0001JU-8N for emacs-devel@gnu.org; Sat, 11 Nov 2006 07:40:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gis9O-0001HW-Nv for emacs-devel@gnu.org; Sat, 11 Nov 2006 07:39:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gis9O-0001HK-HE for emacs-devel@gnu.org; Sat, 11 Nov 2006 07:39:58 -0500 Original-Received: from [150.29.246.133] (helo=mx1.aist.go.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gis9O-0003Pg-6Z for emacs-devel@gnu.org; Sat, 11 Nov 2006 07:39:58 -0500 Original-Received: from smtp4.aist.go.jp ([150.29.246.12]) by mx1.aist.go.jp with ESMTP id kABCdnWC025379; Sat, 11 Nov 2006 21:39:50 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id kABCdhGE008100; Sat, 11 Nov 2006 21:39:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1Gis9w-0002If-00; Sat, 11 Nov 2006 21:40:32 +0900 Original-To: Romain Francoise In-reply-to: <87irhn1kvk.fsf@pacem.orebokech.com> (message from Romain Francoise on Fri, 10 Nov 2006 14:39:27 +0100) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:62069 Archived-At: In article <87irhn1kvk.fsf@pacem.orebokech.com>, Romain Francoise writes: > Kenichi Handa writes: > > I vaguely remember that I changed cut-buffer decoding to use > > locale-coding-system (if any) instead of iso-8859-1 upon a > > bug report from someone. He claimed that many X > > applications store a data encoded by the current locale in > > cut-buffer (even if that doesn't conform to ICCCM), thus it > > is better that Emacs also decodes it by the coding system > > specified by the locale. Even xterm, when run under, for > > instance, cs_CS.ISO8859-2 locale, stores ISO8859-2 > > characters as is in cut buffer. > Would it be feasible to use `detect-coding-string' to decide which > encoding to use? I think tring locale-coding-system at first, and if that yields undecoded eight-bit characters, decoding by iso-8859-1 is good. --- Kenichi Handa handa@m17n.org