[Top][All Lists]

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

bug#9653: 24.0.50; `ucs-names' - Why all of the ("" . XXX) entries?

From: Stefan Monnier
Subject: bug#9653: 24.0.50; `ucs-names' - Why all of the ("" . XXX) entries?
Date: Sun, 02 Oct 2011 21:28:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Is this a bug?  There are lots of entries in `ucs-names' that have "" as
> the car.

Indeed, that's odd.
We could filter them out, of course, but there's something fishy: the
code of ucs-names does:

          (while (<= c end)
            (if (setq name (get-char-code-property c 'name))
                (push (cons name c) names))
            (if (setq name (get-char-code-property c 'old-name))
                (push (cons name c) names))

but it turns out that `name' is never nil there, whereas it is often "".
So either we need to change ucs-names to filter out those useless
entries, or we need to change (get-char-code-property c 'name) and
(get-char-code-property c 'old-name) so it returns nil rather than the
empty string.

Handa-san, could you take a look at this?  Is (get-char-code-property
c 'name) supposed to return "" when the char has no name or is it
supposed to return nil?  Either way is fine by me (all those "" are
really one and the same string, so they don't waste memory).

> In `ucs-names', what are the CHAR-NAMEs "VARIATION SELECTOR-n" all about (for
> n=17...256)?  Are those actually character names?

It depends on what you mean by "character".  They are in the sense of
Elisp's characters, and it can be occasionally useful to be able to
manually insert them (if for nothing to test what happens when they
appear in a file/buffer).  So it's good that C-x 8 RET allows the user
to enter them, even if you hopefully will never need to use them yourself.


reply via email to

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