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

Re: mutt to show hi-bit chars once & for all?



On Sun 09/18/05 at 06:46 PM +0200,
Alain Bench <messtic@xxxxxxxxx> wrote:
> That on Saturday, September 17, 2005 at 11:10:52 PM -0400, I wrote:
> > commenting-out the "set charset" line in my.muttrc, I lose the
> > thread-tree character

> Threads and umlauts will both come back once locale and terminal
> will begin to agree one way or the other. Hopefully. ;-)

Yes -- hopefully.  I've discovered that if, in my .zshenv file,
 I set:

                LC_CTYPE="en_US.UTF-8"

it ruins the display of my ISP's system man pages, presumably because
the pagers "most and "less" (the display gets messed up in both of them)
use high-bit characters to do formatting on the man pages.

(The zsh man says for LC_CTYPE:  "This variable determines
the locale category for character handling functions.")
Okay, it all begins to make sense.

So, for the moment, at least, my locale settings are as follows:

[panix1:~]  [v4.2.5]  zsh  1006 --> locale
LANG="en_US.UTF-8"
LC_CTYPE="en_US.ISO8859-1"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=""
[panix1:~]  [v4.2.5]  zsh  1007 -->

Yesterday I tried to set all of these locale variables above to
"en_US.ISO8859-1".  but only LANG, LC_CTYPE and LC_MESSAGES will accept
ANY setting.  The other four remain with their setting at "C" no matter
what I may try to set them to.  (I'm wondering if it's important that
LANG, LC_CTYPE and LC_MESSAGES all be set identically, or not.)

But wait -- voila!  I just checked mutt after setting locale as you see
here above.  It appears that mutt is now displaying the high-bit chars
as it should.  I think the key for me here is to set LANG to en_US.UTF-8
to fix the mutt display,  and to make sure to have LC_CTYPE set as it is
("en_US.ISO8859-1") to keep the man pages displaying correctly.  Problem
solved, so far, at least.

But I wonder why the four "C" settings can't be changed.  They're not
set that way in the system zprofile.  (Any settings in the system's
zprofile  will override my settings in .zshenv, and so need to be set in
.zshrc).

> > Would you give me a few examples of what I might *not* have "written
> > in UTF-8" that would need to be changed, and how changed?
> 
>     Well: Aliases, regexps, attribution, dates, all strings... Every
> single hi-bit character has to be written in UTF-8. Or in any other
> charset(s) with corresponding $config_charset(s). This might help to
> detect an erroneous hi-bit:
> 
> | $ iconv -f utf-8 -t utf-8 ~/.mutt/* > /dev/null
> | iconv: illegal input sequence at position 164

I tried, at my shell prompt:

1015 --> iconv -f utf-8 -t utf-8 ~/.muttrc > /dev/null
1016 --> iconv -f utf-8 -t utf-8 .muttrc > /dev/null
1017 -->

and got nothing for either of them.  I really don't think I have *any*
high-bit characters anywhere in my .muttrc or my .mutt-aliases or
.mime-types or .mailcap files.  I never used them.  In fact, I've only
just a few days ago learned how to create them in vim.

> >>| $ printf "\xC3\xBC"
[...]

> > that's a capital "A" with a cedilla above it, and a small "pi" sign
> 
>     Capital A with tilde "~" above,

Sorry -- yes, I meant with the tilde, not the cedilla.

> and what? Sorry I have to be sure:
> Could you take a big font and a magnifier, and look again this second
> character? Could it be an OE ligature, or a 1/4 symbol?

No, that is, in fact, as I said -- it's "Pi" -- the mathematical Pi
sign -->  ¼  <--.

And what gives:
> 
> | $ print "\xA6"

Okay, *now* I've got the oe ligature.  That's what that command returns.
In any event, the problem appears to be solved, by setting LANG to
en_US.UTF-8, and LC_CTYPE to en_US.ISO8859-1.  All this is on a NetBSD
2.0 system.  Thanks for your help and expertise.

-- 
                         // rj@xxxxxxxxx //
      Just because I have a short attention span doesn't mean