You are not logged in.

#1 2012-09-30 14:04:26

kalle97
Member
Registered: 2012-07-18
Posts: 80

[SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

If you have this kind of problem stated above in the title, or similar, here is what I did...

Make sure you have correct locale, you'll need a UTF-8 one.

As stated in the install guide(or beginner's guide iirc) do the following:
Uncomment  one of the locales in "/etc/locale.gen", it doesn't have to be language pacific if you're only after using UTF-8 which provides more characters than normal ASCII.
then run "locale-gen". Make sure to set your "/etc/locale.conf" to "LANG=en_US-UTF8" of course you can choose whatever locale you want not just "en_US-UTF-8". After that make sure to reboot, it may also work with just log-out and log-in again, but I did not reboot and neither log-out and when back in. If it still doesn't work, run "locale" and "locale-a" if the output is "C" in each column just redo what I stated above, if it still not work, then you have to consult the manual, wiki and if you don't find the problem use a search-engine and if you still don't find answer here on the forums, the people here is really helpful! smile

Last edited by kalle97 (2012-10-01 17:46:16)

Offline

#2 2012-09-30 14:24:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

I had this issue too on a test system (on a usb stick), I thought "WTF!?!?" until I realized... on crap, I forgot to create /etc/locale.conf.... d'oh!

Offline

#3 2012-09-30 14:28:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

Read https://plus.google.com/114015603831160 … zKCcnTWDpa on how locale works in Arch.

Offline

#4 2012-09-30 16:23:04

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

Okey I uncommented sv_SE.utf8 in /etc/locale.gen ...

You're supposed to uncomment "sv_SV.UTF-8 UTF-8", then run locale-gen (with sudo), not "sv_SE.utf8".


https://wiki.archlinux.org/index.php/Be … ide#Locale

^ Except that you shouldn't use "echo" in this case. That command works well when you're logged in as root, but for sudo, not so much. Check the file with nano and you'll see that nothing changed. For sudo, use tee.

$ sudo tee /etc/locale.conf <<< "LANG=en_US.UTF-8"

Note: You don't necessarily need "sv_SV" for those characters to show up. Setting a "sv_SV" locale would make programs show up in Swedish instead of English - unless that's what you want. UTF-8 locales will cover those characters just fine (provided that the font from the terminal actually contains those glyphs, of course).


If you still have problems, post the output of:

$ ls -l /etc/profile.d/locale.sh
$ curl sprunge.us -F sprunge=@/etc/locale.gen
$ curl sprunge.us -F sprunge=@/etc/locale.conf
$ locale -a
$ locale

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-09-30 17:20:02

kalle97
Member
Registered: 2012-07-18
Posts: 80

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

" Okey I uncommented sv_SE.utf8 in /etc/locale.gen ...

You're supposed to uncomment "sv_SV.UTF-8 UTF-8", then run locale-gen (with sudo), not "sv_SE.utf8".
"

That's what I did.


"
https://wiki.archlinux.org/index.php/Be … ide#Locale

^ Except that you shouldn't use "echo" in this case. That command works well when you're logged in as root, but for sudo, not so much. Check the file with nano and you'll see that nothing changed. For sudo, use tee.

$ sudo tee /etc/locale.conf <<< "LANG=en_US.UTF-8"

Note: You don't necessarily need "sv_SV" for those characters to show up. Setting a "sv_SV" locale would make programs show up in Swedish instead of English - unless that's what you want. UTF-8 locales will cover those characters just fine (provided that the font from the terminal actually contains those glyphs, of course).
"

So you mean I can have en_US.UTF8 as locale but still write swedish letters? So the problem is with the font or somthing, not the locale?

"
If you still have problems, post the output of:

$ ls -l /etc/profile.d/locale.sh
$ curl sprunge.us -F sprunge=@/etc/locale.gen
$ curl sprunge.us -F sprunge=@/etc/locale.conf
$ locale -a
$ locale

"

Well, I did as the guide told about locale.conf, it doesn't seem to work, even if "locale" outputs correct info now, but I'll try with restarting the X server too, just in case.....

Offline

#6 2012-09-30 18:01:35

kalle97
Member
Registered: 2012-07-18
Posts: 80

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

It didn't worked, tried both sv_SV.UTF-8 and sv_SE.UTF-8 and en_US.UTF-8, still no ÅÖÄ in terminal.

$ ls -l /etc/profile.d/locale.sh
-rwxr-xr-x 1 root root 1133 Aug 27 21:56 /etc/profile.d/locale.sh
$ curl sprunge.us -F sprunge=@/etc/locale.gen
 http://sprunge.us/HEFV
$ curl sprunge.us -F sprunge=@/etc/locale.conf
 http://sprunge.us/BjBL
$ locale -a
C
POSIX
en_US.utf8
$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
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=

Any suggestions?

Thanks in advance.

Offline

#7 2012-09-30 18:04:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

What's the output of

cat ~/.config/locale.conf

Offline

#8 2012-09-30 18:22:05

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

Your locale.gen file doesn't have anything uncommended. Uncomment English (US) - the UTF-8 variant, and run locale-gen.

Both operations need to be done with root privileges (sudo).


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-09-30 18:55:21

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

Could well be the /etc/vconsole.conf. Mine;

KEYMAP="sv-latin1"
FONT="lat0-16"

And I do use the sv_SE.utf8 in locale.conf. sv_SV can't be correct.

Last edited by swanson (2012-09-30 18:59:44)

Offline

#10 2012-09-30 19:01:26

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

It depends.

kalle97, when you say "terminal", you're referring to a terminal (a window) from an X session, right?

If you're referring to the console (the tty), then yeah, you probably need to use a different font for those glyphs to show up.

https://wiki.archlinux.org/index.php/Be … and_keymap

... The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It's recommended that you change it to Lat2-Terminus16, because according to /usr/share/kbd/consolefonts/README.Lat2-Terminus16, it claims to support "about 110 language sets".


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#11 2012-10-01 09:41:42

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

If it's not solved - as it shouldn't be since the heading hasn't been changed and no solution is provided -  I have another suggestion.

Thing is I just found a similar problem on a computer in our common room at work (yes, it runs Arch). You could try to reinstall filesystem which provides etc/profile.d/locale.sh. On the PC in question the file was missing (don't ask, because I don't know why), so on boot locale wasn't exported. After reinstalling filesystem the locale specified was exported correctly.

Try and see if that helps.

Edit: corrected some weird English.

Last edited by KimTjik (2012-10-01 11:35:34)

Offline

#12 2012-10-01 17:47:53

kalle97
Member
Registered: 2012-07-18
Posts: 80

Re: [SOLVED]Something wrong with Locale, "ÅÖÄ" doesn't work in terminal.

Add solution above, here is some tags in-case if someone searches about the same problem..

utf-8 problems
ÅÖÄ doesnt work
Å Ö Ö å ä ö
some characters doesn't work

Offline

Board footer

Powered by FluxBB