Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
utf-8, LC_CTYPE woes [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Wed Sep 16, 2009 8:28 pm    Post subject: utf-8, LC_CTYPE woes [SOLVED] Reply with quote

This is my current setup:

Code:
jel@jel-desktop ~ $ cat /etc/env.d/02locale
LC_CTYPE="sv_SE.UTF-8"
LC_TIME="sv_SE"


Produces the following

Code:
jel@jel-desktop ~ $ locale
LANG=C
LC_CTYPE=sv_SE.UTF-8
LC_NUMERIC="C"
LC_TIME=sv_SE
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=


This is doing exactly what I want. utf-8 chars in gnome-terminal & console, swedish dates & everything else in english.

Except for one thing: Some apps get confused. I see crap like "(null)tis ons tor fre(null)" in the clock applet. etc. If I change "LC_CTYPE=sv_SE.UTF-8" to "LC_CTYPE=sv_SE" everything looks OK again, but then I lose utf-8 in terminals.

Is it possible to fix this or do I just have to accept that some programs don't like the utf-8 suffix on LC_CTYPE?
_________________
# dd if=/dev/urandom of=/dev/sda bs=512


Last edited by jel on Wed Sep 16, 2009 10:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
zsitvaij
n00b
n00b


Joined: 11 Jan 2006
Posts: 74

PostPosted: Wed Sep 16, 2009 9:22 pm    Post subject: Reply with quote

Aren't you mixing non-utf8 with utf8? Why not declare LANG="en_US.UTF-8" if you want English unicode?
Back to top
View user's profile Send private message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Wed Sep 16, 2009 10:37 pm    Post subject: Reply with quote

zsitvaij wrote:
Aren't you mixing non-utf8 with utf8? Why not declare LANG="en_US.UTF-8" if you want English unicode?


I was indeed! Specifying LANG="en_US.UTF-8" didn't make any difference but tacking utf-8 onto LC_TIME was the solution.

Code:
jel@jel-desktop ~ $ cat /etc/env.d/02locale
LANG="en_US.UTF-8"
LC_CTYPE="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"


Code:
jel@jel-desktop ~ $ locale
LANG=en_US.UTF-8
LC_CTYPE=sv_SE.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME=sv_SE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


The clock applet is working now. Thanks for the kool-aid!
_________________
# dd if=/dev/urandom of=/dev/sda bs=512
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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