[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bidi properties from uniprop tables

From: Eli Zaretskii
Subject: bidi properties from uniprop tables
Date: Thu, 18 Aug 2011 22:06:03 +0300

If a character code is missing from UnicodeData.txt, the uniprop_table
API in C returns zero as its bidi class, which should never happen
(valid classes start at 1).  This causes crashes in redisplay, because
bidi.c is unable to handle a character that has no valid properties.

The get-char-code-property function returns nil for such characters.
Here's an example:

  (get-char-code-property #x378 'bidi-class) => nil

You will not find 0x0378 in UnicodeData.txt.

Such undefined characters should not normally appear in any text, but
`describe-categories' produces such codes, and Emacs crashes when
browsing the buffer created by that command.

I made the code in bidi.c defensive about what it gets from the
uniprop table, but the question is, should we do something to never
have nil in Lisp or zero in C return from these APIs?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]