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: tmm.el: non-ASCII characters with locale-coding-system Date: Wed, 16 Apr 2008 11:38:06 -0400 Message-ID: References: <20080416.220902.173219381.tats%nobody@tats.iris.ne.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208361354 3058 80.91.229.12 (16 Apr 2008 15:55:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2008 15:55:54 +0000 (UTC) Cc: nori1@dolphin.c.u-tokyo.ac.jp, czkmt@remus.dti.ne.jp, emacs-devel@gnu.org To: Tatsuya Kinoshita Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 16 17:56:27 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jm9im-0000eC-Ak for ged-emacs-devel@m.gmane.org; Wed, 16 Apr 2008 17:38:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jm9i7-0007cC-S0 for ged-emacs-devel@m.gmane.org; Wed, 16 Apr 2008 11:38:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jm9i4-0007c7-Tq for emacs-devel@gnu.org; Wed, 16 Apr 2008 11:38:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jm9i4-0007bv-98 for emacs-devel@gnu.org; Wed, 16 Apr 2008 11:38:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jm9i3-0007bs-Tz for emacs-devel@gnu.org; Wed, 16 Apr 2008 11:38:07 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jm9i3-0000N5-Lf for emacs-devel@gnu.org; Wed, 16 Apr 2008 11:38:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8EAA26BUhMCqsI/2dsb2JhbACBYK0v X-IronPort-AV: E=Sophos;i="4.25,664,1199682000"; d="scan'208";a="18654810" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 16 Apr 2008 11:38:06 -0400 Original-Received: from pastel.home ([76.10.171.8]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id WTC98406; Wed, 16 Apr 2008 11:38:06 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 923498DD0; Wed, 16 Apr 2008 11:38:06 -0400 (EDT) In-Reply-To: <20080416.220902.173219381.tats%nobody@tats.iris.ne.jp> (Tatsuya Kinoshita's message of "Wed, 16 Apr 2008 22:09:02 +0900 (JST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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 Xref: news.gmane.org gmane.emacs.devel:95356 Archived-At: > Could you please consider applying the following patch to handle > non-ASCII characters with locale-coding-system for tmm.el? > - (setq gl-str elt) > + (setq gl-str (decode-coding-string elt locale-coding-system)) [...] > + (setcar elt (decode-coding-string (car elt) locale-coding-system)) In both cases, you assume that the elt (or its `car') is a unibyte string that needs to be decoded. But those should have been decoded already. Please try and figure out why they're still unibyte strings rather than pre-decoded multibyte strings. > The patch is created by Tetsuo Tsukamoto (czkmt at remus.dti.ne.jp) > at http://mail.ring.gr.jp/skk/200803/msg00009.html to prevent a > problem of displaying Japanese characters with tmm.el reported > by Noritada Kobayashi at Debian BTS http://bugs.debian.org/470646. > To reproduce the problem, > * Install Daredevil SKK 13.1 (http://openlab.jp/skk/) and Emacs > 23.0.60 or 22.2. > * Run Emacs with `LC_ALL=ja_JP.UTF-8 emacs -q'. > * Type `M-x skk-mode RET', `M-`' and `s' to select the menu `s==>SKK', > and then garbled characters (\351\240\230...) are displayed. My guess is that if you try the same thing with a different locale, it will fail, because the skk-mode for some reasons places utf-8 encoded unibyte strings in the menu, so the if any decoding is needed it should be with utf-8 rther than with locale-coding-system. Stefan