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: Non-ASCII in Lucid menus Date: Wed, 16 Mar 2005 18:13:43 -0500 Message-ID: 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> <4238A5D4.6090701@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111016855 14538 80.91.229.2 (16 Mar 2005 23:47:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Mar 2005 23:47:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 17 00:47:34 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBiEZ-0005xs-1v for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 00:47:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBiUi-0002Hg-WB for ged-emacs-devel@m.gmane.org; Wed, 16 Mar 2005 19:04:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBiTj-0002HH-NE for emacs-devel@gnu.org; Wed, 16 Mar 2005 19:03:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBiTi-0002H2-Mv for emacs-devel@gnu.org; Wed, 16 Mar 2005 19:03:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBiKV-0007zb-0n for emacs-devel@gnu.org; Wed, 16 Mar 2005 18:53:36 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DBhi0-0001XE-9M for emacs-devel@gnu.org; Wed, 16 Mar 2005 18:13:48 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id AB3A3340004; Wed, 16 Mar 2005 18:13:47 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id F074B4AC268; Wed, 16 Mar 2005 18:13:43 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id BD933F696F; Wed, 16 Mar 2005 18:13:43 -0500 (EST) Original-To: "Jan D." In-Reply-To: <4238A5D4.6090701@swipnet.se> (Jan D.'s message of "Wed, 16 Mar 2005 22:32:04 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.82, requis 5, autolearn=not spam, AWL 0.08, BAYES_00 -4.90) 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:34650 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34650 >> In any case, here is the new improved patch. This new patch should also >> enable non-ASCII in Motif menus, although I haven't actually checked it. > I think you can have that already as long as your menu strings are in your > locale. It works for me :-) Actually, I doubt this is true because the encoding currently used is "make_string_unibyte", which can only work for unibyte locales. This much also already works with Lucid (no need for my patch here). Hmmm... in the mean time I actually tried my patch with the Motif toolkit and my claim fell on its face: At least with the lesstif version in "Debian testing" the menus do not properly display unicode when the locale is "fr_CH.UTF-8" (locale with which the Lucid menus do display unicode chars correctly with my patch). Actually, the precise behavior of the Motif menus in my test indicated that the utf-8 decoding wasn't even taking place, and the 8-bit bytes of the ut-8 encoding were basically interpreted as latin-1. I tried to look at lwlib-Xm.c to see where was the problem, but I really have even less of a clue than for xlwmenu.c; maybe the problem is simply due to a limitation in Lesstif, but I've also tried with OpenMotif-2.2.3 and it doesn't seem to work any better. I also tried to fix my "fontList" specs (use semi-colons to separate entreis, and add a colon terminator), but to no avail. Actually it seems that Motif always assumes the string passed to it is latin-1 (e.g. even in a greek locale, the greek chars (encoded by Emacs into 8bit chars before handing them off to Motif) end up displayed as latin-1 accented chars). So my guess is that we do something wrong (Motif obviously supports more than just latin-1), but we'd need a programmer familiar with Motif to help us out. Stefan