On Wed, May 11, 2011 at 09:41:32PM +0000, Alan Mackenzie wrote:
> On Mon, May 09, 2011 at 02:16:23PM -0700, Nick wrote:
> > The font you are using likely doesn't support the line glyphs.   I've
> > found Envy Code R to be a good all-purpose font that supports a good
> > number of glyphs.
> 
> Surely it would have to be included as part of mutt.  I think the font's
> author doesn't permit this.

Not at all... The console uses the same font no matter what program
you're running (unless it's a program to set the console font, I
suppose).  Mutt has nothing to do with it.  Your system provides a
number of fonts which are loadable on the console.  How you do that
has changed a number of times though.

> Are these line drawing glyphs in Unicode, anywhere?  

Yes.  Mutt displays perfectly fine on my UTF-8 console, for what it's
worth.

> I hate unicode, especially UTF-8.  Perhaps it would be best for me to go
> back to good old ISO 8859-1.

Not likely.  The world is moving (or, by and large, has already moved)
to Unicode; eventually the older encoding schemes will very likely
disappear entirely, and you'll run into all sorts of problems.
There's no reason to hate UTF-8; it is just yet another encoding
system which now very well supported and superior technically to
ISO-8859-1.  Don't hate technological advancement because you chose
not to keep up with it... :)

> > > I run mutt 1.5.21 on a Linux virtual terminal (NOT in X).  Yesterday I
> > > converted my system software from ISO-8859-1 to UTF-8.  

What does that mean, exactly?  What kernel/distro release/version are you
running, and how did you convert?  It seems very likely that there are
pieces missing from whatever procedure you followed.

> > > Now I find that the line graphics in the message index, rather
> > > than looking like lines, look something like this:
> 
> > >     M-b~T~\M-b~T~@>

It seems that either your *console* is not set up for UTF-8, or the
font which is loaded does not contain the glyphs.  Given that what
you're getting is all 8-bit ASCII, I expect it's more likely the
former than the latter.  On my system, where the console is properly
set up as a UTF-8 console, it displays diamond characters when the
font has no glyph for the character it is trying to display.  

One other possibility is that mutt is not built suitably to support
UTF-8.  Look at the output of this command:

  ldd /path/to/mutt

replacing /path/to/mutt with the actual path to your mutt binary.  If
you see libncurses instead of libncursesw, it means mutt was built
without support for wide characters, and will need to be rebuilt.
In that case, most likely you will need to install the correct
ncursesw libraries, including the development bits.  This problem has
bitten me a few times in the past.


> > > .  A bit of internet searching reveals the workaround of setting LANG
> > > thusly:
> 
> > >     LANG=C mutt
> 
> > >  , but this is a mere workaround since it disables UTF-8 where it's
> > > really wanted.

It's no workaround at all; you are indeed turning off UTF-8 and using
plain ASCII.

> > > Is there a proper solution to this dilemma?

There definitely is, though figuring out what it is and then
implementing it may turn out to be really not worth the effort.  Given
that it's not already defaulting to UTF-8 on your system, I imagine
your system is pretty old, as most major distros have been defaulting
to UTF-8 for roughly 5+ years or so.  You may need to replace your
kernel in order to make the console work properly, install some
console fonts and utilities to load them, etc. depending on the
current state of your system.  

If your system is as old as I suspect, then likely by far the easiest
way to deal with this is to upgrade your system to a recent distro.
You'll get UTF-8 configured properly everywhere by default (as long as
you don't tell it not to), and you'll gain a lot of other benefits
too.   If your system is actually recent then telling us what it is
and how you converted it may provide some useful clues as to what's
missing.

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: pgpUubS3HnINe.pgp
Description: PGP signature

Reply via email to