On Sun, Dec 02, 2012 at 08:37:18PM +0000, Jamie Paul Griffin wrote:
> * Will Yardley <mutt-us...@veggiechinese.net> [2012-12-02 11:00:56 -0800]:
>
> > On Sun, Dec 02, 2012 at 09:41:02AM -0600, fREW Schmidt wrote:
> > > (http://dev.mutt.org/trac/wiki/MuttFaq/Charset) and setting
> > >
> > >    export LC_CTYPE=en_US.ISO-8859-1
> > >
> > > did fix the problem, but it also causes perl to scream and shout about
> > > an unsupported locale.
> > [...]
> > > Here is the output of `locale -a`:
> >
> > So, looks like your system only has UTF8 locales installed. Havey ou
> > tried setting $LC_CTYPE to en_US.utf8? The ACS characters work fine for
> > me in UTF8 locales.
> >
> > You may also want to experiment with terminal settings and fonts. What
> > terminal emulator and what value of $TERM are you using?
> >
> > w
>
> There are a number of things to check and set to get this working. It
> can be a bit of a PITA sometimes.
>
> Perl only complains if the LC_* you've set isn't on the system. For
> example: on my system (BSD type) in /usr/share/locales/en_US.UTF-8/
> there is only LC_CTYPE - so I set that. Had I set LC_MESSAGES, ... ,
> then perl would display those annoying errors (which can be turned off
> by the way) as the option is not available on my system.

I understand that they can be turned off, I just figured it was a good
canary (as it did break other more important things.)

> If you're using startx to start your X session, it's recommended
> to add the locale setting to ~/.xinitrc so it's in the environment
> already before opening any terminals, etc. I guess it wouldn't hurt to
> put it in ~/.xsession either, if you're using a display manager to start
> your X session. As you're using Ubuntu, I guess you are.

You are correct, I am using a display manager.  The env vars are
certainly not set for the entire X session, but they are set for every
program that I run as I set up my run command to source my .zshrc

   
https://github.com/frioux/dotfiles/blob/4efc7741f98e6771948f5806ed59fb483347de43/bin/showdm

I just hate hate hate restarting X to fiddle with something like this.

> I also had to make sure I installed a proper unicode-aware terminal
> emulator, and I use urxvt for that. Further, I have installed certain
> fonts and use these in my ~/.Xdefaults file; these fonts support unicode
> characters.

Normally I use terminator but just to keep things simple while trying
to get this to work I installed urxvt (256 color version.)  I'm using
tmux in general so my TERM is set to screen-256color.  I set it to
xterm to see if that would make a difference and frustratingly I had
no luck.  I also tried rxvt-unicode-256color.

The font I use in general is terminus, I don't see any documentation
anywhere as to whether it supports unicode, but outside of mutt I've
always been able to use unicode directly (vim, zsh, git.) (Anecdotal
evidence: just yesterday I wrote a commit message with the
intersection character.)

> So, the things to make sure you have set up are:
>
>  set the locale to a locale that is available on your system

I've tried each and both of the following:

export LC_CTYPE=en_US.utf8
export LANG=en_US.utf8

>  set it in your shell configuration file and X startup file

Done.  (Assuming all programs that are run from X having said env vars
set is sufficient.)

>  use a terminal emulator that is unicode aware

Done. (urxvt-256color)

>  with linux, you should be able to set LANG=whatever;

Done.

>  otherwise, check what LC_* are available.

There are a number of them, but LANG=en_US.utf8 is set by the system
already and the shell (zsh) says all other LC_* are for overriding
LANG.

>  check your shell's documentation with regards to locales
>
> Another thing to check is /etc/login.conf. You can set these environment
> options in there, followed by a run of cap_mkdb /etc/login.conf if you
> change anything in there. (I'm not sure if Linux uses this, I don't use
> Linux systems at all so I don't know.)
>
> These are things I've needed to do, some of these steps may not be
> necessary on Linux but hopefully it will help you or at least give you
> an idea of what to look for.

So I'm out of ideas and suggestions :/  The only thing I can think of
at this point is that I compiled mutt myself, but I just looked at the
configure opts and it doesn't look like I could have accidentally
disabled utf8 support.

--
fREW Schmidt
http://blog.afoolishmanifesto.com

Attachment: pgpnQtRPE9vjO.pgp
Description: PGP signature

Reply via email to