unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Robert <arobert@cogsci.ucsd.edu>
Cc: emacs-devel@gnu.org
Subject: Re: How to convert char from Emacs-20 internal to UTF-8?
Date: Wed, 16 Mar 2005 19:20:26 -0800 (PST)	[thread overview]
Message-ID: <200503170320.j2H3KQHr027977@zakros.ucsd.edu> (raw)
In-Reply-To: 1edb21fc2b6a61e8bd8d7b4d77aec1ec@cogsci.ucsd.edu

> The trunk of the CVS repository (which will becomes Emacs-22)
> already supports OS X (via Carbon).
>
> If that doesn't help you because you want to use some other
> API, I recommend you start from the emacs-unicode-2 branch in
> the CVS repository (which may become Emacs-23).  That branch
> changes the internal character set of Emacs to Unicode, so you
> won't need to convert chars at all.
>
> But work on Emacs-20 so obviously counter productive to me that
> I suspect I just don't understand your motivations enough to
> give you a good response,

I'm sorry, perhaps I should have explained a bit more at
first.. desire to avoid a long-winded email has led to 3
medium-winded ones.  ;)

http://emacs-on-aqua.sf.net is a project to resurrect the old
NeXTstep port of Emacs, that has actually been maintained to some
extent over the years, until the point where it was based on
Emacs 20.7 and partially working on OS X.  (The Cocoa APIs are
based on OpenStep, the successor of NeXTstep).  We are interested
in getting this running well on both OS X and GNUstep, an
open-source implementation of OpenStep, and in bringing it up to
be based on the latest Emacs.

Rather than trying to do both of these at once, we decided to
bring the port up to date first on Emacs 20.7, since the code has
gotten a little rusty over the years.  This has been going well,
but one of the remaining tasks is 2-byte font rendering, which
led to my query.  We think we can handle it as long as we deliver
UTF-8 (or possibly plain unicode) to our renderer.  But we need
to try to be sure, and then will come the task of getting
fontsets working..

So, in our code we have a function ns_dumpglyphs() which plays
the role of dumplglyphs() in xterm.c: an array of GLYPHS is
received, the character info is extracted using
GLYPH_FAST_CHAR(), along with other face-related info, and the
text is rendered.  In our case, we need to convert the result of
GLYPH_FAST_CHAR() into UTF-8 or unicode.

  parent reply	other threads:[~2005-03-17  3:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16 16:46 How to convert char from Emacs-20 internal to UTF-8? Adrian Robert
2005-03-16 17:19 ` Stefan Monnier
2005-03-16 19:19   ` Adrian Robert
2005-03-16 19:38     ` Stefan Monnier
2005-03-17  3:20     ` Adrian Robert [this message]
2005-03-22 17:30   ` Adrian Robert
2005-03-23  4:52     ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503170320.j2H3KQHr027977@zakros.ucsd.edu \
    --to=arobert@cogsci.ucsd.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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).