[Koha] configuring mysql for default utf8 support in koha
H.S.
hs.samix at gmail.com
Tue Mar 10 13:50:27 NZDT 2009
Hello,
Just sharing my experience here. To configure mysql to support utf8 as
default,
init-connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
character_set_client=utf8
With these, I get these as variables in mysql:
mysql> show variables like "char%";
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
Further I added the following lines in /etc/mysql/my.cnf (in the
respective stanzas as shown below):
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld_safe]
default-character-set=utf8
[mysqld]
default-character-set=utf8
and restarted mysql. I then got the following set variables in mysql (as
root):
mysql> show variables like "char%";
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.01 sec)
So looks like specifying the default char sets helped. If others have
insights in to this, please share. I am not experienced in mysql so I do
not know all the details about the factors affecting char sets in mysql
in various situations.
Thanks.
--
Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.
More information about the Koha
mailing list