Solved system-wide UTF-8

Hi,

I am trying to make my new server completely UTF8 (UNICODE) and to do this I edided /etc/login.conf by adding the following 3lines in the default:\ section
Code:
default:\
             (lines omitted) \
             :lang=en_US.UTF-8:
I then ran cap_mkdb /etc/login.conf
The output of locale is the same before and after the change...

Could anyone please help me out?
How can I change FreeBSD to be UTF8 globaly?
 
Hi,

I am trying to make my new server completely UTF8 (UNICODE) and to do this I edided /etc/login.conf by adding the following 3lines in the default:\ section
Code:
default:\
             (lines omitted) \
             :lang=en_US.UTF-8:
I then ran cap_mkdb /etc/login.conf
The output of locale is the same before and after the change...

Could anyone please help me out?
How can I change FreeBSD to be UTF8 globaly?
I have the following set in /etc/login.conf:
Code:
default:\
             [...]
             :charset=UTF-8:\
             :lang=en_US.UTF-8:\
             :umask=022:
I also set LANG in my shell's startup files. It has always seemed to work for me.
 
You're better off leaving root's environment to the "C" locale. In theory nothing in the ports(7) or build(7) subsystems would take offense at UTF-8 locales but that's not guaranteed, especially on the ports system where ports can use their own bundled custom build tools that are outside the ports quality control.
 
Note that you have to exit out to login: and relogin to see the change. If you are on X11, exit session.

cron(8) does not seem to do the completesetusercontext(3) for peoples cronjobs. I have lang and charset in login.conf, but trying crontab with * * * * * env > doodle gives only the
basic
Code:
LOGNAME=junki
PATH=/usr/bin:/bin
PWD=/home/junki
USER=junki
HOME=/home/junki
SHELL=/bin/sh
Something to remember.

Juha
 
Hi protocelt
I added
Code:
default:\
             [...]
             :charset=UTF-8:\
             :lang=en_US.UTF-8:\
I then ran # cap_mkdb /etc/login.conf
The output of locale is the same before and after the change...
I rebooted the server to be sure.. I was expecting to see all the UTF-8 setting...
 
Hi protocelt
I added
Code:
default:\
             [...]
             :charset=UTF-8:\
             :lang=en_US.UTF-8:\
I then ran # cap_mkdb /etc/login.conf
The output of locale is the same before and after the change...
I rebooted the server to be sure.. I was expecting to see all the UTF-8 setting...
Hi.

What is the output of sed -n '25,52p' /etc/login.conf on the machine?
 
It's enough to have just ~/.login_conf in ASCII. You must either cap_mkdb it, or rm ~/.login_conf.db. Binary configs, sigh :)

Juha

Edit: off-topic, apologies, just to remind that the per-user file can be just plain text
 
It's enough to have just ~/.login_conf in ASCII. You must either cap_mkdb it, or rm ~/.login_conf.db. Binary configs, sigh :)

Juha
This works per user but not globally as fred974 specified in the topic line and first post in which case /etc/login.conf would need to be amended.

That said, I think kpa has a good point. The root account is for administrative purposes so I don't see a reason to change root's environment so this is probably the best way to change the locale. I've since changed my own configuration(s) accordingly.
 
Back
Top