unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Unicode -> string? Invalid code point! // Adding a menu item with unicode characters
@ 2005-04-18 13:51 David Reitter
  0 siblings, 0 replies; 2+ messages in thread
From: David Reitter @ 2005-04-18 13:51 UTC (permalink / raw)


How can I specify strings for a menu item that have unicode-range 
characters in them?
To be concrete, I'd like to specify the 'command sign' character (to 
show a keyboard shortcut with the command key). The unicode ID of this 
character is 0x2318, and I assume I'll have to convert this to the 
internal multibyte representation first. But when I do

(make-char 'mule-unicode-0100-24ff 8504)

I just get an 'invalid code point' error.
Is that the correct charset for the job?

When I have my character, will something like (make-string 1 (make-char 
...)) produce a good multibyte string, and can I pass that to my 
easy-menu or define-key as a text for the menu item?

Many thanks
- D

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

* Re: Unicode -> string? Invalid code point! // Adding a menu item with unicode characters
       [not found] <mailman.1851.1113833166.2895.help-gnu-emacs@gnu.org>
@ 2005-04-18 14:15 ` David Kastrup
  0 siblings, 0 replies; 2+ messages in thread
From: David Kastrup @ 2005-04-18 14:15 UTC (permalink / raw)


David Reitter <david.reitter@gmail.com> writes:

> How can I specify strings for a menu item that have unicode-range
> characters in them?
> To be concrete, I'd like to specify the 'command sign' character (to
> show a keyboard shortcut with the command key). The unicode ID of this
> character is 0x2318, and I assume I'll have to convert this to the
> internal multibyte representation first. But when I do
>
> (make-char 'mule-unicode-0100-24ff 8504)
>
> I just get an 'invalid code point' error.
> Is that the correct charset for the job?

Why not just (decode-char 'ucs #X2318) ?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

end of thread, other threads:[~2005-04-18 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 13:51 Unicode -> string? Invalid code point! // Adding a menu item with unicode characters David Reitter
     [not found] <mailman.1851.1113833166.2895.help-gnu-emacs@gnu.org>
2005-04-18 14:15 ` David Kastrup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).