From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How to convert char from Emacs-20 internal to UTF-8? Date: Wed, 16 Mar 2005 14:38:02 -0500 Message-ID: <87hdjbidzr.fsf-monnier+emacs@gnu.org> References: <64cb038a0c479b993368280a127af987@cogsci.ucsd.edu> <87acp3jyqi.fsf-monnier+emacs@gnu.org> <1edb21fc2b6a61e8bd8d7b4d77aec1ec@cogsci.ucsd.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111002871 24521 80.91.229.2 (16 Mar 2005 19:54:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Mar 2005 19:54:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 16 20:54:30 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBeVq-0007tO-Sy for ged-emacs-devel@m.gmane.org; Wed, 16 Mar 2005 20:49:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBelz-0000zx-Hx for ged-emacs-devel@m.gmane.org; Wed, 16 Mar 2005 15:05:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBel4-0000fP-5z for emacs-devel@gnu.org; Wed, 16 Mar 2005 15:04:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBel1-0000dS-Ry for emacs-devel@gnu.org; Wed, 16 Mar 2005 15:04:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBeh2-0007m9-J3 for emacs-devel@gnu.org; Wed, 16 Mar 2005 15:00:36 -0500 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DBeLE-0003NJ-OB for emacs-devel@gnu.org; Wed, 16 Mar 2005 14:38:05 -0500 Original-Received: from alfajor ([67.68.217.141]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050316193802.TNXP1919.tomts22-srv.bellnexxia.net@alfajor>; Wed, 16 Mar 2005 14:38:02 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id CDCD22FEB3; Wed, 16 Mar 2005 14:38:02 -0500 (EST) Original-To: Adrian Robert In-Reply-To: <1edb21fc2b6a61e8bd8d7b4d77aec1ec@cogsci.ucsd.edu> (Adrian Robert's message of "Wed, 16 Mar 2005 14:19:16 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34644 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34644 > Thanks. Are the encode-coding-string and encode-char functions a) fast > enough to be used inside of dumpglyphs() for screen rendering and b) > something I can easily lift out of 21 and backport to 20? I'm asking > because this is for a GNUstep/OS X interface for emacs 20 > (http://emacs-on-aqua.sf.net/), and while we'd like to bring it up to date > to work with the coming emacs-22 (where I assume this problem disappears > completely), this is a large job and we'd like to have support for 2-byte > font and other i18n rendering in the meantime. (In the OpenStep APIs, > conversions to native font encoding are handled internally, so we don't need > all of CCL's generality, but we need to get characters in UTF-8 or unicode > to give to the APIs in the first place.) 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, Stefan