[arch-general] Character encoding on new install

Mantas M. grawity at gmail.com
Sat Feb 25 11:57:19 EST 2012


On Sat, Feb 25, 2012 at 07:10:51AM -0800, Tim Stella wrote:
> I have locales set correctly in /etc/locale.gen:
> 
> en_US.UTF-8 UTF-8
> en_US ISO-8859-1

Have these locales been generated? After editing locale.gen, you have to run `locale-gen` as root.

> and according to 'locale', all my variables seem to be in order:
> 
> LANG=en_US.UTF-8
> [...]

Where are these locale variables set?

If they are in your `.bashrc`, it could be that your terminals do not have the proper variables -- for example,

    awesome            LANG=""
    └── xterm          LANG=""              - expects ISO-8859-1
        └── bash       LANG="en_US.UTF-8"   - emits UTF-8
	    └── mc     LANG="en_US.UTF-8"   - emits UTF-8

-- causing the terminal to expect a different charset than the one `mc` uses.

You can check using ` tr "\0" "\n" < /proc/$PPID/environ ` in a new terminal (where $PPID should expand to the PID of xterm/sakura/whatever).

-- 
Mantas M. <grawity at gmail.com>


More information about the arch-general mailing list