emacs-devel
[Top][All Lists]
Advanced

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

Re: Unicode Char Names: describe-char-unicode-data vs get-char-code-prop


From: Eli Zaretskii
Subject: Re: Unicode Char Names: describe-char-unicode-data vs get-char-code-property
Date: Fri, 27 Dec 2013 22:31:59 +0200

> Date: Fri, 27 Dec 2013 12:09:36 -0800
> From: "T.V. Raman" <address@hidden>
> 
> I use describe-char-unicode-data to speak unicode chars in
> emacspeak when navigating by character.
> 
> That function claims to be semi-obsolete -- and recommends
> get-char-code-property instead; however the answers are not
> consistent in the two solutions.
> 
> Try non-breaking space \240 (octal)
> 
> (setq char ? )
> 160 (#o240, #xa0, ? )
> (describe-char-unicode-data char) returns
> (("Name" "NO-BREAK SPACE") ("Category" "Separator, Space")
> ("Combining class" "Zs") ("Bidi category" "Zs") ("Decomposition"
> "noBreak ") ("Decimal digit value" nil) ("Digit value" nil)
> ("Numeric value" nil) ("Mirrored" nil) ("Old name" "NON-BREAKING
> SPACE") ("ISO 10646 comment" nil) ("Uppercase" nil) ...)
> whereas
> (get-char-code-property char 'name) returns
> "COMMA NO-SHE IOTA ARABIC DIAERESIS"
> also looking up char in ucs-names yields something different
> (car (rassoc char (ucs-names))) returns
> "NON-NEITHER UNDER CM COMMA"
> Note that all of the above is with the unicdoedata file present
> and correctly found by emacs.

I cannot reproduce any of these.  For me, both
describe-char-unicode-data and get-char-code-property returns the same
name, "NO-BREAK SPACE", and from ucs-names I get "NON-BREAKING SPACE",
which is the "Old Name" property of that character.

> Also, and perhaps related:
> 
> C-x 8 spc inserts non-breaking space correctly; however when you
> use C-x 8 ret, non-breaking space doesn't show up in the
> available completions -- either using it's "name" or "old-name"

This also works as expected on my system.

Please dig deeper into your configuration and customizations, the
answer is somewhere there.



reply via email to

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