emacs-devel
[Top][All Lists]
Advanced

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

Re: How to convert char from Emacs-20 internal to UTF-8?


From: Stefan Monnier
Subject: Re: How to convert char from Emacs-20 internal to UTF-8?
Date: Wed, 16 Mar 2005 12:19:33 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> I apologize for the "retro" question, but I was wondering if there was an
> easy way to convert a character in the Emacs-20 internal 19-bit encoding
> (from FAST_GLYPH_CHAR(glyph)) to UTF-8 (preferable) or straight Unicode.
> I'd like to do it fully within C if possible, and it needs to be efficient.

Since Emacs-21's internal chars are a superset of Emacs-20's internal chars,
you can just use Emacs-21's facilities like (encode-coding-string <str>
'utf-8) or (encode-char <char> 'ucs).


        Stefan




reply via email to

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