[debian-mysql] Bug#573542: mysql-server: please make utf-8 the default character encoding

Thomas Koch thomas at koch.ro
Fri Mar 12 09:18:58 UTC 2010


Package: mysql-server
Version: 5.0.51a-24+lenny3
Severity: minor

Currenlty, on an unmodified Debian install of MySQL:

mysql> SHOW VARIABLES LIKE 'character_set%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | latin1                     |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

mysql> SHOW VARIABLES LIKE 'collation%';
+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database   | latin1_swedish_ci |
| collation_server     | latin1_swedish_ci |
+----------------------+-------------------+
3 rows in set (0.00 sec)

I propose, that in squeeze+1 latin1 should be replaced everywhere by
utf8.

Also the following create statements should by default use utf8:
create database test; create table test( test char(10) );

but they don't currently:

mysql> show create database test;
+----------+-----------------------------------------------------------------+
| Database | Create Database
|
+----------+-----------------------------------------------------------------+
| test     | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET
latin1 */ |
+----------+-----------------------------------------------------------------+

mysql> show full columns from test.test;
+-------+----------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type     | Collation         | Null | Key | Default | Extra |
Privileges                      | Comment |
+-------+----------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| test  | char(10) | latin1_swedish_ci | YES  |     | NULL    |       |
select,insert,update,references |         |
+-------+----------+-------------------+------+-----+---------+-------+---------------------------------+---------+

The issue has been discussed on debian-devel:
http://lists.debian.org/debian-devel/2009/08/msg00277.html

I know, that in a perfect world people would specify the encoding
themselves. But it's not so and I've worked in two PHP/MySQL companies
which had legacy latin1 databases because nobody ever worried about
character encodings in the beginning.

Best regards, Thomas Koch

-- System Information:
Debian Release: squeeze/sid
  APT prefers stable
  APT policy: (1000, 'stable'), (990, 'unstable'), (700, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mysql-server depends on:
ii  mysql-server-5.0       5.0.51a-24+lenny3 MySQL database server binaries

mysql-server recommends no packages.

mysql-server suggests no packages.

-- no debconf information





More information about the pkg-mysql-maint mailing list