From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: GNU Emacs 22.0.50 fails to find =?iso-8859-1?q?=E4?= in different ISO Latin encodings Date: Fri, 22 Sep 2006 19:31:47 +0900 Message-ID: References: <1B8CD230-9A54-4F2A-B0FA-5CD02730F034@web.de> <4CEE7BA9-0CEF-40CD-A081-2C707A44833B@web.de> <453787ED-925B-49B5-A203-3211329FCB13@web.de> Reply-To: Miles Bader 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 1158921296 9777 80.91.229.2 (22 Sep 2006 10:34:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Sep 2006 10:34:56 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org, rms@gnu.org, Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 22 12:34:54 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 1GQiMO-0001HF-FN for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2006 12:34:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQiMN-0008GG-Nx for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2006 06:34:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GQiM9-0008D1-0c for emacs-devel@gnu.org; Fri, 22 Sep 2006 06:34:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GQiM5-00085v-Md for emacs-devel@gnu.org; Fri, 22 Sep 2006 06:34:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQiM5-00085b-JG; Fri, 22 Sep 2006 06:34:01 -0400 Original-Received: from [203.180.232.83] (helo=mgate03.necel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GQiPf-0006QW-Vj; Fri, 22 Sep 2006 06:37:44 -0400 Original-Received: from relay11.aps.necel.com (relay11 [10.29.19.46]) by mgate03.necel.com (8.13.8/8.13.1) with ESMTP id k8M92Ei3013844; Fri, 22 Sep 2006 19:33:49 +0900 (JST) Original-Received: from relay21.aps.necel.com ([10.29.19.20] [10.29.19.20]) by relay11.aps.necel.com with ESMTP; Fri, 22 Sep 2006 19:33:49 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay21.aps.necel.com with ESMTP; Fri, 22 Sep 2006 19:33:49 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 5EB0344C; Fri, 22 Sep 2006 19:31:47 +0900 (JST) Original-To: Peter Dyballa System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <453787ED-925B-49B5-A203-3211329FCB13@web.de> (Peter Dyballa's message of "Fri\, 22 Sep 2006 11\:06\:03 +0200") Original-Lines: 42 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:60097 gmane.emacs.pretest.bugs:14093 Archived-At: Peter Dyballa writes: > C-s C-q 245 in ISO 8859-16 does not find ``=E2=80=9E=C2=B4=C2=B4 (U+201E= ) =E2=80=93 mini-=20 > buffer tells me that ``=C2=A5=C2=B4=C2=B4 (\245 in ISO 8859-1) cannot be = found. That's because the numeric code following C-q is _not_ a unicode code point, it's an Emacs character code. In Emacs 22 those two things are very different (in Emacs 23, I guess they are the same, as Emacs 23 uses unicode for its internal codes). You can see the "Emacs character code" of a character by hitting C-x =3D on top of that character in a buffer. E.g., C-x =3D says that ``=E2=80=9E=C2=B4=C2=B4 has Emacs code 1234576, and= indeed entering `C-s C-q 1234576 RET' successfully searches for =E2=80=9E ! Similarly, the Emacs code for =C2=A5 is 4245, and that also works correctly following C-q. > Which is the formula to map octal 0156772 to a Unicode slot/position? > Octal 0156772 is DDFA in hex, which is different from 5B57, =E5=AD=97's > position in Unicode. (encode-char #o156772 'ucs) =3D> 23383 (#o55527, #x5b57) > Or: how can I find the octal value for a given Unicode slot (U+ABCD)? (decode-char 'ucs #x5b57) =3D> 56826 (#o156772, #xddfa) [There seems to be no such unicode character #xABCD known to Emacs.] Note that (decode-char 'ucs CODE) continues to work properly in Emacs 23, even though Emacs internal codes are completely different (in Emacs 23, of course, it basically just returns its 2nd argument), so it seems a good function to use for code portable between Emacs 22 and 23. -Miles --=20 (\(\ (^.^) (")") *This is the cute bunny virus, please copy this into your sig so it can spr= ead.