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

Michael Stucki michael at typo3.org
Wed Nov 10 14:44:54 CET 2010


Hi Masi,

>> 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.

I agree. I think the patch works correct, though, but we need to check
this again.

Basically, like already mentioned in my last post, the database
connection can still be latin1, so we're not really enforcing utf-8,
we're just defaulting to it for new sites.

> 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.

There are many TYPO3 sites who have latin1 tables with utf-8 content
thanks to forceCharset and multiplyDBfieldSize (argh!)

This is why we can't convert all sites automatically, but again, a
script solution might be able to cover most of all cases.

Because of this, this RFC should be checked if it only meets the
following conditions:

1) Existing sites:

For existing sites who get upgraded, some lines need to be added while
running the update wizard, but DB-wise no conversion must happen.

2) New sites:

All defaults (including the DB charset) are set properly so UTF-8 is
used right from the start.

- michael

> 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.
> 
> If you ignore the default charset of the DB you have to make sure that each new table and column is
> created with "utf8" (utf8_general_ci).
> 
> Masi


-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list