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

Michael Stucki michael at typo3.org
Thu Nov 11 23:01:25 CET 2010


Hi Jigal,

> In this case you might lose those characters (as documented by MySQL).
> If that is your definition of "fail", then it fails.

Exactly.

> If the "connection" (I assume you mean something like SET NAMES latin1)
> is latin1 then the data you send to MySQL is assumed to be encoded in
> the latin1 charset. I don't think that PHP will convert the strings
> before sending them to the MySQL client, so you will probably end up
> with UTF-8 content which is seen as Latin1 data.

Well, that's exactly what I wrote before :-)

> Converting is rather simple when you first convert the columns to a
> binary type which is comparable with the original (VARCHAR -> VARBINARY,
> TEXT -> BLOB, etc.) and then convert them to the original type with the
> utf8 charset defined for that column.

Right, I can confirm this works (used it for a while more or less
without problems). However, it's clearly a hack and depends on the
Install Tool for converting fields back to the right types (VARBINARY =>
VARCHAR, etc.)

I'm now in favour of creating a simple mysqldump and replacing the
CHARACTER SET statement from table definitions.

The difficulty is only that some fields/tables have proper charset
definitions, and some not. We need to find out how well this works, but
I'm getting closer to think it is absolutely doable.

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


More information about the TYPO3-team-core mailing list