From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: bidi properties from uniprop tables Date: Fri, 19 Aug 2011 13:44:48 +0900 Message-ID: <87k4aako1r.fsf@uwakimon.sk.tsukuba.ac.jp> References: <83ei0isfok.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1313729097 4283 80.91.229.12 (19 Aug 2011 04:44:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 19 Aug 2011 04:44:57 +0000 (UTC) Cc: emacs-devel@gnu.org, Kenichi Handa To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 19 06:44:53 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QuGwv-0001Kz-CV for ged-emacs-devel@m.gmane.org; Fri, 19 Aug 2011 06:44:53 +0200 Original-Received: from localhost ([::1]:42374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuGwu-0006At-M0 for ged-emacs-devel@m.gmane.org; Fri, 19 Aug 2011 00:44:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuGws-0006Ao-8U for emacs-devel@gnu.org; Fri, 19 Aug 2011 00:44:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuGwr-0005jX-DQ for emacs-devel@gnu.org; Fri, 19 Aug 2011 00:44:50 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:56049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuGwq-0005hi-2L; Fri, 19 Aug 2011 00:44:48 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 8A9FE3FA0727; Fri, 19 Aug 2011 13:44:39 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id C90D51A32CF; Fri, 19 Aug 2011 13:44:48 +0900 (JST) In-Reply-To: <83ei0isfok.fsf@gnu.org> X-Mailer: VM 8.1.93a under 21.5 (beta31) "ginger" cd1f8c4e81cd XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.223 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143421 Archived-At: Eli Zaretskii writes: > Such undefined characters should not normally appear in any text, Somebody misread the standard, I think. In Unicode, everything in the space 0 -- (2^20-1) is a character, with a few well-defined exceptions called non-characters. Most, however do not (yet) appear in the UCD, but are reserved for future standardization. Since the standard regularly adds new characters, older versions of Emacs are very likely to encounter reserved characters "normally" in "some" texts. The UCD makes provision for this by providing definitions of some properties for *all code points* (not merely all defined characters). Unassigned (including noncharacter) code points automatically get the General_Category property with value Cn (Unicode 6.0, section 4.5, Table 4.9). They also automatically get the Name property, with value "" (the null string, Unicode 6.0, section 4.8, "Formal Definition of the Name Property", p. 132. > I made the code in bidi.c defensive about what it gets from the Maybe that should be an assert, since a null return is an Emacs bug. > uniprop table, but the question is, should we do something to never > have nil in Lisp or zero in C return from these APIs? Yes, a non-nil property list is required by the standard for all code points (not merely "all characters"), and it is obvious that in this case conforming to the standard is useful.