View Single Post

   
  #7 (permalink)  
Old 02-21-2008, 05:38 AM
Harald Hannelius
 
Posts: n/a
Default Re: xfce: utf-8 support?

andrew <andrew@ilium.invalid> wrote:
> On 2007-10-14, Damjan <gdamjan@gmail.com> wrote:
> >> But adding this to ~./bashrc had little effect on Terminal and killed
> >> vim fairly badly. Am I missing something obvious here?

> >
> > Your X session starts and never reads ~/.bashrc .. so that wouldn't work.
> > The correct place for per-user X session environment would be ~/.xprofile
> > (which could source .bashrc)


> So the change I made in /etc/profile.d/lang.sh would actually be a
> _global_ setting for all users? Not so much of a problem on this
> single user machine but something I will keep in mind for the future.


> So you don't have to read back the change was from:


> export LANG=en_US.ISO8859-1


> to


> export LANG=enUS.UTF-8


X is picky about case in locale-names. Other programs don'รค seem that picky.

export LANG=en_US.utf8

is the correct way for me on slack 10.1 that works (programs started from an
rxvt don't complain about missing locales). You can get a list of available
locales with 'locale -a'.

Slackware's xdm (gdm and probably kdm too) reads ~/.profile and ~/.xprofile
at login. So in order to get all programs running correctly you ought to fix
your ~/.profile or ~/.xprofile and then log out an in again.

Also note that usually LC_ALL overrides LANG. I have the habit of setting
every LC_* one by one, and leaving LC_ALL empty (if set, will overwrite
every other LC_ variable). This way I can get the C-behaviour of sorting the
output of 'ls -la'. Also I don't get bitten by the no-more-case-sensitive
regexps in bash when LC_COLLATE=C (or POSIX).

This works for me;

$ locale
LANG=en_US.utf8
LC_CTYPE=en_US.utf8
LC_NUMERIC=en_US.utf8
LC_TIME=C
LC_COLLATE=C
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 only problem I have had is a few borked copyright and punctuation
> marks in man pages but I believe there is a fix for this by specifying
> non-utf-8 encoding for man pages only: not sure how to do this.


Either make an alias for 'man';

alias man='LC_ALL=C man'

Or define your LESSCHARSET as utf-8

I prefer the second method.

--
A: Top Posters! | s/y Charlotta |
Q: What is the most annoying thing on mailing lists? | FIN-2674 |
http://www.fe83.org/ Finn Express Purjehtijat ry | ============= |
Harald H Hannelius | harald (At) iki (dot) fi | GSM +358 50 594 1020
Reply With Quote