From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Non-ASCII in Lucid menus Date: Sun, 20 Mar 2005 12:46:36 +0100 Message-ID: <423D629C.5000809@swipnet.se> References: <877jkce8lv.fsf-monnier+emacs@gnu.org> <42341EC4.3060405@swipnet.se> <87r7ijbray.fsf-monnier+emacs@gnu.org> <7b2c4ca190cea7657e31ed04f07d3377@swipnet.se> <87ll8nk49o.fsf-monnier+emacs@gnu.org> <87u0n960b7.fsf-monnier+emacs@gnu.org> <87fyys3c4e.fsf-monnier+emacs@gnu.org> <87psxvxhvl.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111319570 21287 80.91.229.2 (20 Mar 2005 11:52:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2005 11:52:50 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 20 12:52:50 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DCyz6-0005gm-QQ for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2005 12:52:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCzFz-0006Vo-Ml for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2005 07:10:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DCzDf-0005y7-EU for emacs-devel@gnu.org; Sun, 20 Mar 2005 07:07:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DCzDc-0005xG-D7 for emacs-devel@gnu.org; Sun, 20 Mar 2005 07:07:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCzDb-0005p0-FY for emacs-devel@gnu.org; Sun, 20 Mar 2005 07:07:43 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DCytl-0006AB-Pp; Sun, 20 Mar 2005 06:47:14 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050320114711.XXNT4482.mxfep02.bredband.com@coolsville.localdomain>; Sun, 20 Mar 2005 12:47:11 +0100 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: Stefan Monnier In-Reply-To: <87psxvxhvl.fsf-monnier+emacs@gnu.org> 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:34813 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34813 Stefan Monnier wrote: >> Well, my patch does not address the issue mentioned by Dave: it can only >> display multilingual chars that are part of the user's locale. >>Could it select the locale according to the characters to be displayed? >> >> > >The locale info is embedded somewhere in the Xt widget info (I'm not sure >where, really), so maybe it can be done, but I don't know how. >It's probably easier to temporarily select a utf-8 locale when creating the >widget, so as to get the same behavior as Gtk where the menus always use >utf-8. > The Xt widget creation code just calls the string to fontset converter that in turn XCreateFontSet that in turn calls XCreateOC and then finally somewhere there is a call to setlocale(LC_CTYPE, NULL). So I guess the only way to to this is to set LC_ALL or LC_CTYPE in the environment prior to widget creation (assuming X does not cache this information at startup) as you suggest. Jan D.