[TYPO3-core] RFC #7942: Enable UTF-8 by default

Jigal van Hemert jigal at xs4all.nl
Wed Nov 10 15:04:56 CET 2010


Hi,

On 10-11-2010 14:09, Martin Kutschker wrote:
> Am 10.11.2010 11:27, schrieb Benjamin Mack:
>> Note: It doesn't matter if the DB is UTF-8 or not, because the
>> database only needs to know in which format the data is going to be
>> sent from and to TYPO3 (that is: the connection info). However, we
>> encourage people to make their DB utf-8 by default.
>
> This is not true. Collation (sorting) and sorting works on a
> character set.

AFAIK TYPO3 has no support whatsoever for using character sets and
collations in queries. So sorting and comparing will be done with the
collation/charset which is set for a certain column/table/database in MySQL.
This is already the subject of some issues where people report that
lists in some language are not sorted correctly according to the sorting
rules of that language.

SET NAMES utf8; will only influence the MySQL client (PHP) and
connection character set. This way the communication to and from MySQL
will be using UTF-8.
If data from that connection ends up in tables with other character sets
MySQL will take care of the conversion. The same is true for data which
comes from a column/table/db with another character set than UTF-8:
MySQL will convert the data to UTF-8.

> So I would recommend a check of the default charset of the database
> and a check of all table columns for any existing tables within the
> DB.

Not necessary at all.

> Additionally I suggest to set the collation "utf8_general_ci"
> explicitly for a new DB. I'm not sure if you can change the default
> collation for a charset, but why risk anything.

No, default collations are defined in MySQL. Maybe you can change them 
by recompiling MySQL, but that is not a normal situation.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list