FreeBSD and UTF-8

BeastieUTF-8 is a variable-width character encoding set, that has been designed with backward compatibility for the popular ASCII character encoding set. UTF-8 has become the standard in popular open source multilingual operating systems.

There is one exception though. UTF-8 is not standard in the FreeBSD operating system. However, FreeBSD can be configured for UTF-8.

Determine the locale, that you will be using, with the following command.

locale -a | grep UTF

Configure the default login class. In this example, the following changes was made to the default login class for the Danish language.

:passwd_format=md5:\
:copyright=/etc/COPYRIGHT:\
:welcome=/etc/motd:\
-    :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
+    :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES,LC_COLLATE=C:\
:path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\
:nologin=/var/run/nologin:\
:cputime=unlimited:\
:vmemoryuse=unlimited:\
:priority=0:\
:ignoretime@:\
-    :umask=022:
+    :umask=022:\
+    :charset=UTF-8:\
+    :lang=da_DK.UTF-8:

Rebuild the login class database with the following command.

sudo cap_mkdb /etc/login.conf

Be aware, that user settings will override the system wide settings. If this is a problem, the user settings can be commented out.

nano -w ~/.login_conf

Restart all applications and log in again.

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.


Comments are closed.