On 2011-05-18, Derek Martin <[email protected]> wrote:

[Firstly, thanks much for the pointers.]

> 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.

Yep:

   LANG=en_US.utf8
   LC_CTYPE="en_US.utf8"
   LC_NUMERIC="en_US.utf8"
   LC_TIME="en_US.utf8"
   LC_COLLATE="en_US.utf8"
   LC_MONETARY="en_US.utf8"
   LC_MESSAGES="en_US.utf8"
   LC_PAPER="en_US.utf8"
   LC_NAME="en_US.utf8"
   LC_ADDRESS="en_US.utf8"
   LC_TELEPHONE="en_US.utf8"
   LC_MEASUREMENT="en_US.utf8"
   LC_IDENTIFICATION="en_US.utf8"
   LC_ALL=

> The next thing to look at is to make sure that Mutt is compiled
> against ncursesw rather than ncurses.

Yep:

   $ ldd /usr/bin/mutt
           linux-gate.so.1 =>  (0xffffe000)
           libncursesw.so.5 => /lib/libncursesw.so.5 (0xb7705000)
           libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0xb76b2000)
           libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0xb7547000)
           libgdbm.so.3 => /usr/lib/libgdbm.so.3 (0xb7540000)
           libc.so.6 => /lib/libc.so.6 (0xb73f4000)
           libdl.so.2 => /lib/libdl.so.2 (0xb73f0000)
           libz.so.1 => /lib/libz.so.1 (0xb73da000)
           /lib/ld-linux.so.2 (0xb776f000)
           
And ncurses was built with unicode support:

   $ equery uses ncurses
   [ Searching for packages matching ncurses... ]
   [...]
    + + unicode     : Adds support for Unicode
 

> 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 use XFCE rather than gnome or KDE.  I've tried urxvt, uxterm, Eterm,
and Terminal (the XFCE4 terminal), with that font and with several
others with the same registry (and that seemed to show the same set of
glyphs in xfontsel).  Same results in all of them, stuff that looks
like this:

   \214.?

That should look something like '.' or "." (not sure which).

> 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.

That could be it.  I don't have LANG set to an UTF locale when I start
X.  Every time I've tried to enable UTF support across-the-board, I've
run into so many problems that I switched back.  Mutt is the only
program where I've run into any need for UTF, so I set LANG to a UTF
locale before starting the terminals in which I run mutt.

> 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.

How do you control the "mode" if it's not set by LANG and
LC_<whatever> in the environment when the terminal is started?

-- 
Grant Edwards               grant.b.edwards        Yow! I'd like MY data-base
                                  at               JULIENNED and stir-fried!
                              gmail.com            

Reply via email to