unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Tatsuya Kinoshita <tats@vega.ocn.ne.jp>
Cc: nori1@dolphin.c.u-tokyo.ac.jp, czkmt@remus.dti.ne.jp,
	emacs-devel@gnu.org
Subject: Re: tmm.el: non-ASCII characters with locale-coding-system
Date: Wed, 16 Apr 2008 11:38:06 -0400	[thread overview]
Message-ID: <jwvlk3des0e.fsf-monnier+emacs@gnu.org> (raw)
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)")

> 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




  reply	other threads:[~2008-04-16 15:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16 13:09 tmm.el: non-ASCII characters with locale-coding-system Tatsuya Kinoshita
2008-04-16 15:38 ` Stefan Monnier [this message]
2008-04-16 16:15   ` Tatsuya Kinoshita
2008-04-17 14:21     ` Tatsuya Kinoshita

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=jwvlk3des0e.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=czkmt@remus.dti.ne.jp \
    --cc=emacs-devel@gnu.org \
    --cc=nori1@dolphin.c.u-tokyo.ac.jp \
    --cc=tats@vega.ocn.ne.jp \
    /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).