all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bidi properties from uniprop tables
@ 2011-08-18 19:06 Eli Zaretskii
  2011-08-19  4:44 ` Stephen J. Turnbull
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2011-08-18 19:06 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

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?



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-08-23 23:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 19:06 bidi properties from uniprop tables Eli Zaretskii
2011-08-19  4:44 ` Stephen J. Turnbull
2011-08-19  6:43   ` Eli Zaretskii
2011-08-19  9:15     ` Stephen J. Turnbull
2011-08-19 10:36       ` Eli Zaretskii
2011-08-19 12:10         ` Stephen J. Turnbull
2011-08-20 12:42         ` Kenichi Handa
2011-08-20 13:00           ` Eli Zaretskii
2011-08-23 12:51   ` Kenichi Handa
2011-08-23 14:49     ` Eli Zaretskii
2011-08-23 23:36       ` Kenichi Handa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.