Hi Grant,

On Tue, May 17, 2011 at 04:32:07PM +0000, Grant Edwards wrote:
> It's been years since mutt displayed more than a small fraction of my
> incoming mail correctly.  I've tried setting LC_CTYPE and LANG
> according to http://wiki.mutt.org/?MuttFaq/Charset, but no matter what
> I choose, there's always a large percentage of mails that won't
> display properly.
> 
> Some of my e-mail comes in as UTF-8, some as IS0-8859-1, so I don't
> see how picking one or the other is ever going to work right.

Easy: ISO-8859-1 is a subset of UTF-8, and mutt uses iconv to convert
between them.  UTF-8 is definitely what you want.  Note, however, that
many mailers (especially Microsoft ones) use ISO-8859-1 when they
really mean "Windows-1252" or something similar.

Now, the problem is most likely that something in your environment is
not right.  You might start by checking the output of the locale
command.  Generally, you want to set LANG and make sure the other LC_*
variables are unset.  In that case, the value of the LC_* variables is
inherited from LANG; you can see this in the output of locale when the
value is shown in quotes -- the quotes mean the value is inherited,
and no quotes means it's been set manually.  You'll want to make sure
that all of these variables are set to a UTF-8 locale.  [I personally
always set LC_COLLATE=C, which restores the historical ASCII-betical
sort order.]

The next thing to look at is to make sure that Mutt is compiled
against ncursesw rather than ncurses.  The S-lang library may also
work now, though in the past it did not.  You may need to make sure
that the ncursesw development bits are installed to make that work;
but I believe if you have them Mutt's configure notices and uses them
by default.

Lastly you need to make sure you're using a font that has all the
glyphs for the language you're trying to read.  If you're using a
recent gnome or KDE terminal, they use bonobo to figure out a font to
use and it "just works" (usually).  With the older terminals you
generally have to configure a font that has the glyphs, which means
you have to go hunting.  It's been a long while since I could remember
what package the font comes from, but for xterm I use this font:

  -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-*

I generally just make sure I install every font package that my system
offers that mentions unicode.

The last problem I've encountered is that in the past, some systems
were still defaulting to non-UTF-8 charsets, and even if you set your
LANG properly your X session was started with a non-unicode
environment.  The end result being that a terminal launched from
gnome-panel (or whatever app bar you use) would be running in
non-unicode mode but configured with a unicode font, producing a
mismatch.

Hope that helps.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: pgpGEOCmxq4EG.pgp
Description: PGP signature

Reply via email to