# Locale problems - swedish characters



## bmildh (Feb 6, 2013)

Hello!

I have recently installed FreeBSD 9.1-RELEASE, GENERIC Kernel, amd64, on my ThinkPad X230. It's running on wmware. I'm not using X11 at all, this is all on the console. 

So, I have a problem setting the locale. I can't get the shell to use swedish character, Ã¥Ã¤Ã¶. When I type these keys, I get strange charactes instead, like the sigma symbol or the divisor symbol. There are only two accounts, the root and a user. Right now, I'm only trying to fix this for root, thinking, if I can make it work for root, I can apply similar changes to the user account. The root uses csh as It's shell. The user has bash as It's shell. 

What I want is a system-wide change, enabling swedish character, preferable for all users. 

In /etc/login.conf I have added, under the default, for classless users:


```
:charset=ISO8859-1:\
   :LANG=sv_SE.8859-1:
```

In /etc/rc.conf I have:

```
keymap="swedish.iso"
   font8x8="iso15-8x8"
   font8x14="iso15-8x14"
   font8x16="iso15-8x16"
```

I know there is an example in /etc/login.conf, about using a login class, the example in that file is for russia (and could easily apply changes to swedish). I have not yet tried this, because, what I would like is to able to use swedish without a specific login class, it should just be the default. 

When I run the command locale, this is the output:

```
LANG=sv_SE.ISO8859-1
```

   All the other LC-types are set to the same. The LC-ALL is not set at all. 

Could anyone shed some light on this subject? I have checked the handbook, but it does not really say that much more, other than sugesting using a loginclass. 

Regards
//bmildh


----------



## SirDice (Feb 6, 2013)

> The default /etc/login.conf shipped with FreeBSD is an out of the box configuration. *Whenever changes to this, or the user's ~/.login_conf, file are made, the modifications will not be picked up until cap_mkdb(1) is used to compile the file into a database.* This database file will have a .db extension and is accessed through cgetent(3).  See getcap(3) for a more in-depth description of the format of a capability database.


From login.conf(5).


----------



## bmildh (Feb 6, 2013)

I know, forgot to mention that I've run:


```
cap_mkdb /etc/login.conf
```

everytime I've changed/modified the login.conf.


----------



## SirDice (Feb 7, 2013)

bmildh said:
			
		

> ```
> :charset=ISO8859-1:\
> :LANG=sv_SE.8859-1:
> ```


This looks like a typo. LANG should be set to sv_SE.*ISO*8859-1.


----------



## bmildh (Feb 8, 2013)

SirDice said:
			
		

> This looks like a typo. LANG should be set to sv_SE.*ISO*8859-1.



That was indeed a typo. I had stared at it for too long to see it. I changed it and ran cap_mkdb. I logged out and back in but it did not work. Rebooted and it worked! Thank you


----------

