Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UTF-8 not working in xorg [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 272
Location: Malmö, Sweden

PostPosted: Sun Sep 18, 2005 10:16 am    Post subject: UTF-8 not working in xorg [SOLVED] Reply with quote

I've set up UTF-8 after reading the guide Using UTF-8 with Gentoo. In the console it works perfectly. But in xorg it doesn't work at all. In xterm (or uxterm) typing the character ö requires two keypresses and then öö comes out all at once. Filenames with umlauts are wrong and file contents with umlauts are wrong. It is independent of the wm I use (I've tried fluxbox and the default twm).

If I run xterm from an xterm window it starts but produces the following (see my locale settings below):
Code:
Warning: locale not supported by Xlib, locale set to C

In /etc/X11/xorg.conf I have
Code:
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option  "XkbLayout" "se"
EndSection

I've also tried using
    Option "XkbLayout" "se_SE"
and
    Option "XkbLayout" "se_SE.UTF-8"
which have the effect that I can't type any umlaut characters in any application.

I have these locale settings
Code:
sterna ~ $ locale
LANG=sv_SE.UTF8
LC_CTYPE="sv_SE.UTF8"
LC_NUMERIC="sv_SE.UTF8"
LC_TIME="sv_SE.UTF8"
LC_COLLATE="sv_SE.UTF8"
LC_MONETARY="sv_SE.UTF8"
LC_MESSAGES="sv_SE.UTF8"
LC_PAPER="sv_SE.UTF8"
LC_NAME="sv_SE.UTF8"
LC_ADDRESS="sv_SE.UTF8"
LC_TELEPHONE="sv_SE.UTF8"
LC_MEASUREMENT="sv_SE.UTF8"
LC_IDENTIFICATION="sv_SE.UTF8"
LC_ALL=sv_SE.UTF8


Any suggestions what to do?
_________________
man cannot be brave without being afraid


Last edited by Seron on Sun Sep 18, 2005 8:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
derfian
n00b
n00b


Joined: 30 Sep 2004
Posts: 48
Location: Linköping, Sweden

PostPosted: Sun Sep 18, 2005 2:31 pm    Post subject: Reply with quote

What does locale -a say? That should give you a list of availible locales to use.
Code:
$ locale -a
...
sv_SE.utf8
...

It looks like you should try putting utf8 in lowercase. Here's how it looks on my machine.
Code:
$ locale
LANG=sv_SE.utf8
LC_CTYPE="sv_SE.utf8"
LC_NUMERIC="sv_SE.utf8"
LC_TIME="sv_SE.utf8"
LC_COLLATE="sv_SE.utf8"
LC_MONETARY="sv_SE.utf8"
LC_MESSAGES="sv_SE.utf8"
LC_PAPER="sv_SE.utf8"
LC_NAME="sv_SE.utf8"
LC_ADDRESS="sv_SE.utf8"
LC_TELEPHONE="sv_SE.utf8"
LC_MEASUREMENT="sv_SE.utf8"
LC_IDENTIFICATION="sv_SE.utf8"
LC_ALL=sv_SE.utf8
Back to top
View user's profile Send private message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 272
Location: Malmö, Sweden

PostPosted: Sun Sep 18, 2005 8:28 pm    Post subject: Reply with quote

Thank you very much derfian!

I changed it to lowercase in /etc/env.d/02locale and then ran env-update. At first it looked like xorg refused to cooperate. I got a black screen with the X cursor in the middle and nothing more. But then I noticed twm produced errors about fonts. So I reemerged xorg with USE-flag cjk and after that the wm would start. I didn't think cjk would be necessary as Chinese, Japanese, Korean are not any of the languages I use, but the USE flage index does talk about multi-byte characters.

Just for testing I did switch back to uppercase after reemerging xorg and the problem returned, so it does have to be lowercase.

Thanks again! :D
_________________
man cannot be brave without being afraid
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum