<<< Date Index >>>     <<< Thread Index >>>

Re: japanese text in email body



so spake Dave Driscoll [2004.06.08 @ 07:31]:
> Hello,
> I'm working for a Japanese owned company in the US and I'm trying to
> set up an email handiling/sorting system. My problem is that some of
> the emails contain Japanese (usually coded per iso-2022-jp). I can't
> get this stuff to show up properly in mutt. I'm running mutt 1.4 on
> Suse linux 8.1. I've tried all the set charset values I can think of
> ditto LANG and LC_CYTPE and it changes the appearance of the text in
> the message body but it's still wrong.  If I change the language for
> my system to Japanese the messages appear correctly but now
> everything-prompts, menu picks, etc. is Japanese. If I save the mail
> and open it in emacs it looks right so I know it can be done.
> Any suggestions?
> Thanks,
> Dave Driscoll  

i use mutt for my japanese email all the time.  the trick is using a
terminal that actually supports multibyte characters, and setting the 
terminals encoding correctly.  i have had success with kterm, mlterm, 
and Eterm (when built with correct support).  once the characters seem to
be appearing (like boxes or weird ascii), you need to set the locale 
(via LANG and LC_* variables) to something appropriate and start mutt.  
here's what i use:

$ cat `which jmail`

#!/bin/sh
export LANG=ja_JP.eucjp
mutt $@

LANGがちゃんと設定されると、これも読めるでしょう。

make sure you are setting the LANG to a locale that actually exists:

$ locale -a | grep ja

ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc

there's also a bunch of aliases in

    /usr/X11R6/lib/X11/locale/locale.alias

in bash shells, one can also do this each time (but i like the script
above better):

   $ LANG=ja_JP.EUC-JP; mutt

whereas in tcsh, you must do:

   $ setenv LANG ja_JP.EUC-JP; mutt

(i haven't had any luck with "$ set LANG=ja_JP.EUC-JP; mutt" in tcsh at
all...)

lastly, to send japanese emails, make sure you send in a format that
people will understand.  many japanese people _still_ don't like utf8,
opting for EUC-JP, SJIS, and iso2022-jp instead.  i have 

    set send_charset=iso-8859-1:iso-2022-jp:utf-8;

for my normal email and:

    set send_charset=iso-2022-jp:euc-jp;

for my japanese.  utf-8 use *might* become more wide-spread in japan,
but until then, i recommend using iso-2022-jp/euc-jp, as i've had no
trouble with that.

では、ガンバ!

-- 
 *------------------------*
//  ste\/e || 0x44288D05 //
*------------------------*

Attachment: pgpFLHZaoZ22W.pgp
Description: PGP signature