Bug #22933
closedInstall tool should by default create database with utf8 charset
100%
Description
The installer creates a database with Latin1 caharacter set as default.
mysql> show create database intro;--------------------------------------------------------------------------+ | Database | Create Database |--------------------------------------------------------------------------+ | intro | CREATE DATABASE `intro` /*!40100 DEFAULT CHARACTER SET latin1 */ |--------------------------------------------------------------------------+
1 row in set (0.01 sec)
This should look like:
mysql> show create database intro;------------------------------------------------------------------------+ | Database | Create Database |------------------------------------------------------------------------+ | intro | CREATE DATABASE `intro` /*!40100 DEFAULT CHARACTER SET utf8 */ |------------------------------------------------------------------------+
1 row in set (0.00 sec)
Which is the result of creating a database using: CREATE DATABASE intro CHARACTER SET utf8 COLLATE utf8_general_ci;
(issue imported from #M14787)
Updated by Chris topher over 14 years ago
TYPO3 just uses the MySQL defaults. And MySQL uses the character set setting from the default database.
If that is utf8, utf8 will also be used for your new DB.
Updated by Chris topher over 14 years ago
I think [SYS][setDBinit] is the variable the Install Tool should use:
You should set this to
SET NAMES utf8;
SET SESSION character_set_server=utf8;
This guarantees that not only all incoming data is seen as UTF-8 encoded, but that also the default charset is set to UTF-8. This default charset is used when creating a new DB.
But then we still have the problem: What shall we do, when TYPO3 is set up for the first time (I think that is what we are speaking of)?
In that case the user has not set anything in the Install Tool yet.
I propose to predefine the value for [SYS][setDBinit] in the dummy package by setting it in localconf.php.
Updated by Chris topher over 14 years ago
And if we already do this, it is also easy to add [BE][forceCharset] = utf-8 to set BE and FE to UTF-8, too, preventing the possibility of seeing broken special chars.
Updated by Michiel Roos over 14 years ago
Right,
We can add that to the packager for the introduction package.
Can it be added to the TYPO3 defaults too?
Updated by Michael Stucki over 13 years ago
- Status changed from New to Accepted
- Assignee set to Michael Stucki
- Target version deleted (
0)
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I0584bfe1e6c50e4a7ea462d0196a45861d2c4d0e has been pushed to the review server.
It is available at http://review.typo3.org/1375
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change I0584bfe1e6c50e4a7ea462d0196a45861d2c4d0e has been pushed to the review server.
It is available at http://review.typo3.org/1375
Updated by Anonymous over 13 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset be01f429e1ac914b04f5bc07dbcf4601dffb06e4.