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: Unicode character read representation Date: Fri, 27 Feb 2009 09:51:01 +0900 Message-ID: References: <87hc2n28a4.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1235695849 16247 80.91.229.12 (27 Feb 2009 00:50:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2009 00:50:49 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 27 01:52:05 2009 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 1LcqxQ-00027E-A4 for ged-emacs-devel@m.gmane.org; Fri, 27 Feb 2009 01:52:04 +0100 Original-Received: from localhost ([127.0.0.1]:60759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lcqw5-0001cq-Ib for ged-emacs-devel@m.gmane.org; Thu, 26 Feb 2009 19:50:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lcqw1-0001ch-P8 for emacs-devel@gnu.org; Thu, 26 Feb 2009 19:50:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lcqvz-0001cV-9X for emacs-devel@gnu.org; Thu, 26 Feb 2009 19:50:36 -0500 Original-Received: from [199.232.76.173] (port=49525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lcqvz-0001cS-3m for emacs-devel@gnu.org; Thu, 26 Feb 2009 19:50:35 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:63536) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lcqvy-0007HK-CR for emacs-devel@gnu.org; Thu, 26 Feb 2009 19:50:34 -0500 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n1R0oUpT004930; Fri, 27 Feb 2009 09:50:30 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n1R0oUY2029487; Fri, 27 Feb 2009 09:50:30 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id n1R0oTMk012541; Fri, 27 Feb 2009 09:50:29 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LcqwP-0004B6-Kf; Fri, 27 Feb 2009 09:51:01 +0900 In-reply-to: (message from Stefan Monnier on Thu, 26 Feb 2009 10:08:53 -0500) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 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:109354 Archived-At: In article , Stefan Monnier writes: > > For instance 0xFFFF is a valid Unicode code-point, but is > > not a character. Should it be accepted or not? > Yes, it should. But I think that \u3FFFFF shouldn't since it's not > a valid unicode code point. Ok, I've just installed this change. Index: lread.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/lread.c,v retrieving revision 1.403 retrieving revision 1.404 diff -u -r1.403 -r1.404 --- lread.c 25 Feb 2009 12:47:24 -0000 1.403 +++ lread.c 27 Feb 2009 00:48:03 -0000 1.404 @@ -2205,7 +2205,7 @@ /* A Unicode escape. We only permit them in strings and characters, not arbitrarily in the source code, as in some other languages. */ { - int i = 0; + unsigned int i = 0; int count = 0; while (++count <= unicode_hex_count) @@ -2222,7 +2222,8 @@ break; } } - + if (i > 0x10FFFF) + error ("Non-Unicode character: 0x%x", i); return i; } --- Kenichi Handa handa@m17n.org