Hello Sam,

 On Tuesday, August 6, 2002 at 9:41:16 AM -0700, Sam Peterson wrote:

> The trouble is that her name is written in Japanese in the from header
> in what I believe is iso-2022-jp, as that's the content-type of her
> message.

    The CT of the message is the type of the *body*. The headers as the
"From:" have to declare their own individual charset and encoding,
something as "From: =?iso-2022-jp?b?something?=" you don't see in Mutt
because it decodes it for you, but can see raw by piping it to less.

    If it's not the case, and Japanese chars are unencoded, then that's
a problem in her mailer. Should not be.


> When she's attributed, her name comes out like this: ?$BF#AR ?$BD>;R,
> in the body, and in the To: header [...] If I switch my locale to
> ja_JP and look in my sent-mail in a kterm, the name appears to not
> have been encoded correctly, as it still shows up as gibberish.

    Yes: 2022 gets decoded, converted to $charset, chars not existing
are changed to question marks (the ESCs in your example), and the bytes
go straight to terminal. As terminal is Latin-1, you don't see Japanese,
but the bytes that would be Japanese on a Japanese terminal. When you
end composing your reply, Mutt believes all these bytes are Latin-1
chars, as that's what $charset says about your terminal. Sorry, don't
think I'm clear, but that's "normal" in Mutt's design.

    Said in another way: Unlike MSOE, Mutt has not the memory of the
charset of the message you reply to... "From:", attribution and quotings
are converted to $charset, possibly losing information. And you are in
that case.

    I believe the only solution is to have a terminal with more
capabilities, so the conversion doesn't lose anything. In your case 2022
or Unicode. And set $charset and LC_CTYPE accordingly.


    [ja_JP in kterm]
> that's a little inconvenient though, as the modelines and menubar show
> up in Japanese and when I try composing other messages my language
> setting in Emacs defaults to Japanese

    I believe Mutt only needs $charset and LC_CTYPE to describe
terminal. So you could play with something as:

| export LANG=en_US.ISO8859-1
| export LC_CTYPE=ja_JP

    ...to have menus talking English but mails in Japanese. If this
doesn't work properly, try the other way round:

| export LANG=ja_JP
| export LC_MESSAGES=en_US.ISO8859-1

    ...or variations of this, as far as LC_CTYPE is explicitly or
implicitly set to ja_JP.


> tried numerous things such as playing with [...] $locale

    $locale is only for the date and time.


Bye!    Alain.
-- 
Microsoft Outlook Express users concerned about readability: For much
better viewing quotes in your messages, check the little freeware
program OE-QuoteFix by Dominik Jain on <URL:http://flash.to/oblivion/>.
It'll change your life. :-) Now exists also for Outlook.

Reply via email to