Project

General

Profile

Actions

Bug #22933

closed

Install tool should by default create database with utf8 charset

Added by Michiel Roos almost 14 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-06-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #18501: Enable UTF-8 by defaultClosedMichael Stucki2008-03-26

Actions
Has duplicate TYPO3 Core - Bug #16388: Installer should honour forceCharset setting when creating a DBClosedChris topher2006-07-21

Actions
Actions #1

Updated by Chris topher almost 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.

Actions #2

Updated by Chris topher almost 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.

Actions #3

Updated by Chris topher almost 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.

Actions #4

Updated by Michiel Roos almost 14 years ago

Right,

We can add that to the packager for the introduction package.

Can it be added to the TYPO3 defaults too?

Actions #5

Updated by Michael Stucki about 13 years ago

  • Status changed from New to Accepted
  • Assignee set to Michael Stucki
  • Target version deleted (0)
Actions #6

Updated by Mr. Hudson about 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

Actions #7

Updated by Mr. Hudson about 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

Actions #8

Updated by Anonymous about 13 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF