You are not logged in.

#1 2008-04-16 04:27:06

kaffetrakter
Member
Registered: 2008-04-16
Posts: 8

Problems with locale or charset

Hiya!

A while ago i had a little accident and deleted my rc.conf file, and possibly some other config files, and i have been having some issues since that. I tried to restore them as best as i could, but i have been experiencing some issues with locales or charset. The biggest problem is probably that i can't write letters like æøå in some applications.

It works fine in some apps, like firefox, but in other apps, like konsole they dont show up at all, and in amarok, kfontview, the run menu, and probably some other places they just show up as two black boxes. k3b on the other hand gives me an error, which ill post further down.

Im using kde, and i have the language set to english, even though i write most of my stuff in norwegian, i like to have an english language on my applications (makes troubleshooting a whole lot easier smile. The first part of my rc.conf looks like this:

LOCALE="en_US.utf8"
HARDWARECLOCK="UTC"
TIMEZONE="Europe/Oslo"
KEYMAP="no"
CONSOLEFONT="lat1-12.psfu.gz"
CONSOLEMAP="8859-1"
USECOLOR="yes"

Heres the output of some commands:

torjus:~$ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
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=en_US.utf8

torjus:~$ locale -a
bokmal
bokml
C
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
nb_NO
nb_NO.iso88591
nb_NO.utf8
nn_NO
nn_NO.iso88591
nn_NO.utf8
no_NO
no_NO.ISO-8859-1
norwegian
nynorsk
POSIX

torjus:~$ cat .zshrc|grep LC
export LC_ALL='en_US.utf8'

My k3b error says this:
"System locale charset is ANSI_X3.4-1968
Your system's locale charset (i.e. the charset used to encode filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally. Most likely the locale is not set at all. An invalid setting will result in problems when creating data projects.
Solution: To properly set the locale charset make sure the LC_* environment variables are set. Normally the distribution setup tools take care of this."

If you need to see output of any other commands or files, just tell me smile
I have looked a bit around, but can't really find a solution to this, anyone know how to fix this?

-Torjus smile

Offline

#2 2008-04-16 20:27:39

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Problems with locale or charset

kde environment is set in .kde/env and it might differ from your configuration.
I would check the language set in your kde control center and eventually your env directory.
A temporary solution could be creating a script to re-set the variables and putting it in env, until you understand why kde set your environment wrong smile

OT:
why does locale outputs the first and che last variables without quotes?

Offline

#3 2008-04-17 20:24:54

kaffetrakter
Member
Registered: 2008-04-16
Posts: 8

Re: Problems with locale or charset

For some reason it seemed to be trying to set the locale to en_GB.utf8, so i tried enabling that in my locale.gen, and now it seems like its working again. But i really dont understand why i can't set it to en_US.utf8, or nb_NO.utf8 even though i have those enabled in my locale.gen,  and locale-gen generates those locales without any errors. I tried looking in the .kde/env folder, but there was nothing there except a file called gtk-qt-engine.rc.sh, and that file didn't contain anything which set any locales or anything like that. So now everything basically works, but i still find it sorta weird that i can't set my locales to anything else than en_GB.utf8...

The reason why some of the locales came out without quotes was because i had a line in my .zshrc which set the locales which i hoped would solve my locale problem, but it didn't.

-Torjus

Offline

#4 2008-04-18 00:38:42

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Problems with locale or charset

kaffetrakter wrote:

For some reason it seemed to be trying to set the locale to en_GB.utf8

Did you check what language you set in your control center menu?

The reason why some of the locales came out without quotes was because i had a line in my .zshrc which set the locales which i hoped would solve my locale problem, but it didn't.

I don't think so

carlocci ~  $  locale
LANG=it_IT.utf8
LC_CTYPE="it_IT.utf8"
LC_NUMERIC="it_IT.utf8"
LC_TIME="it_IT.utf8"
LC_COLLATE="it_IT.utf8"
LC_MONETARY="it_IT.utf8"
LC_MESSAGES="it_IT.utf8"
LC_PAPER="it_IT.utf8"
LC_NAME="it_IT.utf8"
LC_ADDRESS="it_IT.utf8"
LC_TELEPHONE="it_IT.utf8"
LC_MEASUREMENT="it_IT.utf8"
LC_IDENTIFICATION="it_IT.utf8"
LC_ALL=it_IT.utf8

I have the same "problem"

Offline

#5 2008-04-18 02:58:01

kaffetrakter
Member
Registered: 2008-04-16
Posts: 8

Re: Problems with locale or charset

In the control settings the language is set to english, and it can't be changed to anything else, probably because i havent installed any of the languagepacks for kde. But i didn't think that would have anything to do with the locales and such, but i guess it does smile I just checked my output for locale, and now looks like this:

torjus:~$ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE=C
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=

So i guess it still has the missing "'s on the first and last, even though the last one is empty, no clue why tongue

-Torjus smile

Offline

Board footer

Powered by FluxBB