From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: coding systems and input methods are non-intuitive stuff Date: Tue, 30 Jan 2007 09:35:17 +0100 Message-ID: <86zm806hfe.fsf@lola.quinscape.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1170146155 8653 80.91.229.12 (30 Jan 2007 08:35:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Jan 2007 08:35:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kevin Rodgers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 30 09:35:49 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HBoSx-0003dA-MN for ged-emacs-devel@m.gmane.org; Tue, 30 Jan 2007 09:35:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBoSx-0002Vg-4n for ged-emacs-devel@m.gmane.org; Tue, 30 Jan 2007 03:35:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBoSk-0002TF-0h for emacs-devel@gnu.org; Tue, 30 Jan 2007 03:35:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBoSf-0002Qu-QV for emacs-devel@gnu.org; Tue, 30 Jan 2007 03:35:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBoSf-0002Qr-Np for emacs-devel@gnu.org; Tue, 30 Jan 2007 03:35:29 -0500 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HBoSf-0000VB-6r for emacs-devel@gnu.org; Tue, 30 Jan 2007 03:35:29 -0500 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id JAA19459 for ; Tue, 30 Jan 2007 09:35:25 +0100 X-Delivered-To: Original-Received: (qmail 19888 invoked from network); 30 Jan 2007 08:35:25 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 30 Jan 2007 08:35:25 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 7682F23834; Tue, 30 Jan 2007 09:35:17 +0100 (CET) In-Reply-To: (Kevin Rodgers's message of "Tue\, 30 Jan 2007 01\:17\:48 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:65611 Archived-At: Kevin Rodgers writes: > Juanma Barranquero wrote: >> C-x b *scratch* RET >> C-x RET f latin-1 RET ; buffer coding system =3D latin-1 >> C-u C-\ romanian-prefix RET ; input method: romanian-prefix >> ,s ; character: =C5=9F (2362, #o4472, #x93a, >> ; U+015F) >> M-x quail-show-key RET ; To input `=C5=9F', type ",s" >> >> C-x RET f utf-8 RET ; buffer coding system =3D utf-8 >> ; input method: the same as before >> ,s ; character: =C5=9F (331903, #o1210177, >> ; #x5107f, U+015F) >> M-x quail-show-key RET ; =C5=9F can't be input by the current >> ; input method >> >> Now, I understand that the buffer code for these characters is not the >> same... but it is quite weird nonetheless to input a character with >> the current input method, and afterwards be told that it "can't be >> input by the current input method". > > The thing that confuses me is that the ISO 8859-1 character set (which > is what the latin-1 coding system encodes, right?) only contains U+0000 > - U+00FF. So how does U+015F get inserted into a latin-1 buffer? There is no such thing as a "latin-1 buffer" in Emacs. Buffers are always encoded in emacs-mule (well, we still have something called "unibyte" buffers, but they are really only for binary data). The buffer contains characters. Code points of a particular coding system are only associated when saving, loading, communicating with processes, X selections, networks, keyboards, terminals. All those operations have their own coding systems. The buffer itself hasn't. --=20 David Kastrup