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: [PATCH] Unicode Lisp reader escapes Date: Wed, 03 May 2006 11:59:52 +0900 Message-ID: References: <17491.34779.959316.484740@parhasard.net> 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 1146625226 14582 80.91.229.2 (3 May 2006 03:00:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 May 2006 03:00:26 +0000 (UTC) Cc: kehoea@parhasard.net, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 03 05:00:20 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 1Fb7b4-0007zk-QA for ged-emacs-devel@m.gmane.org; Wed, 03 May 2006 05:00:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fb7b4-0000wC-ER for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 23:00:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fb7ao-0000uq-Ld for emacs-devel@gnu.org; Tue, 02 May 2006 22:59:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fb7ao-0000u8-B6 for emacs-devel@gnu.org; Tue, 02 May 2006 22:59:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fb7ao-0000tq-0R for emacs-devel@gnu.org; Tue, 02 May 2006 22:59:58 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fb7b4-0000zv-Op; Tue, 02 May 2006 23:00:15 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k432xrn9013968; Wed, 3 May 2006 11:59:53 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k432xrL7024935; Wed, 3 May 2006 11:59:53 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1Fb7ai-0002Yb-00; Wed, 03 May 2006 11:59:52 +0900 Original-To: Eli Zaretskii In-reply-to: (message from Eli Zaretskii on Tue, 02 May 2006 13:36:44 +0300) 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:53830 Archived-At: In article , Eli Zaretskii writes: >> From: Kenichi Handa >> Date: Tue, 02 May 2006 15:43:16 +0900 >> Cc: emacs-devel@gnu.org >> >> > + lisp_char = call2(intern("decode-char"), intern("ucs"), >> > + make_number(i)); >> > + >> >> First of all, is it safe to call Lisp program in >> read_escape? > Whether it is safe or not, I think it's certainly better to implement > the guts of decode-char in C, if it's gonna be called from > read_escape. All those guts do is simple arithmetics, which will be > much faster in C. I agree. > Moreover, I think the fact that decode-char uses translation tables to > support unify-8859-on-*coding-mode (and thus might produce characters > other than mule-unicode-*) could even be a misfeature: Decode-char doesn't support unify-8859-on-*coding-mode but supports utf-fragment-on-decoding and utf-translate-cjk-mode. > do we really want read_escape to produce Unicode or > non-Unicode characters when it sees \uNNNN, depending on > the current user settings? I think, at least, CJK characters should be decoded into one of CJK charsets because there's no other charsets. --- Kenichi Handa handa@m17n.org