From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: converting between charsets Date: Mon, 15 May 2006 23:50:50 -0400 Message-ID: <87zmhir5tg.fsf-monnier+emacs@gnu.org> References: <87lktejh6f.fsf@myxomop.com> <87u082109z.fsf-monnier+emacs@gnu.org> <84veshaajc.fsf@vinci.loc> <87d5ep1a2c.fsf-monnier+emacs@gnu.org> <84hd40am8t.fsf@vinci.loc> <84ac9rah6z.fsf@vinci.loc> <87k68v82q6.fsf-monnier+emacs@gnu.org> <84bqu17on7.fsf@vinci.loc> <87wtcpqorp.fsf-monnier+emacs@gnu.org> <84zmhk4hnn.fsf@vinci.loc> <871wuwqg43.fsf-monnier+emacs@gnu.org> <84ves74ytd.fsf@vinci.loc> <84d5ef3ua3.fsf@vinci.loc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1147751481 27717 80.91.229.2 (16 May 2006 03:51:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 May 2006 03:51:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 16 05:51: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 1FfqaY-0003sP-IB for ged-emacs-devel@m.gmane.org; Tue, 16 May 2006 05:51:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfqaY-0003oo-5E for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 23:51:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfqaN-0003oj-92 for emacs-devel@gnu.org; Mon, 15 May 2006 23:51:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfqaL-0003oV-4d for emacs-devel@gnu.org; Mon, 15 May 2006 23:51:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfqaL-0003oS-1g for emacs-devel@gnu.org; Mon, 15 May 2006 23:51:01 -0400 Original-Received: from [209.226.175.74] (helo=tomts20-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ffqct-0001qu-Ah for emacs-devel@gnu.org; Mon, 15 May 2006 23:53:39 -0400 Original-Received: from alfajor ([70.53.193.91]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060516035100.OWVE16051.tomts20-srv.bellnexxia.net@alfajor>; Mon, 15 May 2006 23:51:00 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 32A43D91B9; Mon, 15 May 2006 23:50:50 -0400 (EDT) Original-To: emacs-devel@gnu.org In-Reply-To: <84d5ef3ua3.fsf@vinci.loc> (Alexander Kotelnikov's message of "Tue, 16 May 2006 00:30:44 +0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:54546 Archived-At: SM> If you put the cursor on the russian chars before calling SM> encode-coding-region and hit C-u C-x =3D what does it say? > character: =D0=A2 (01212102, 332866, 0x51442) > charset: mule-unicode-0100-24ff > (Unicode characters of the range U+0100..U+24FF.) > code point: 40 66 > syntax: word > category: y:Cyrillic=20=20 > buffer code: 0x9C 0xF4 0xA8 0xC2 > file code: 0xD0 0xA2 (encoded by coding system utf-8) > font: -monotype-courier new-medium-r-normal--13-94-99-99-m-80-iso1= 0646-1 SM> If you put the cursor on the `?' that replaced that char and hit C-u C-= x =3D SM> what does it say? > character: ? (077, 63, 0x3f) > charset: ascii (ASCII (ISO646 IRV)) > code point: 63 > syntax: punctuation > category: a:ASCII l:Latin=20=20 > buffer code: 0x3F > file code: 0x3F (encoded by coding system utf-8) > font: -monotype-courier new-medium-r-normal--13-94-99-99-m-80-adob= e-standard Hmm... with my Emacs (a recent CVS checkout), if I do M-: (encode-coding-string (string 332866) 'koi8-r) RET I get "\364" rather than "?". So either you're running an older Emacs and the problem has been fixed, or there's something else going that I don't understand. Stefan