Encoding and Character Sets in Koha

From Koha Wiki

Jump to: navigation, search
Home > Documentation
Home > Documentation > Installation
Home > Documentation > Tips & Tricks

MySQL

At a bare minimum, for MySQL make sure you have the following in the [mysqld] section of your /etc/mysql/my.cnf:

init-connect = 'SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
character_set_client=utf8

Then restart mysql with: /etc/init.d/mysql restart

See also: MySQL 5.1 Reference Manual :: 9.1 Character Set Support for information about choosing different collations (which will affect how some things are sorted in Koha).

Apache

For Apache make sure you have these lines in your /etc/apache2/httpd.conf (or for ubuntu in /etc/apache2/conf.d/charset ):

AddCharset UTF-8 .utf8 
AddDefaultCharset UTF-8

Above copied from http://kohakenya.wordpress.com/koha-installation/ 

Then restart apache with: /etc/init.d/apache2 restart

Ubuntu

To set locale on ubuntu:

sudo update-locale LANG=en_IN.UTF-8

You have to log out and back in to see locale change reflected in the locale command.