internal > Bug

Correct creation of db tables for utf8 support / #3845

Summary

open
Jan 18, 2007
Jan 18, 2007 / guest
Sep 30, 2007 / psychopath_mind
 

Attached files

No files uploaded
The installation script creates tables without specifying character set or collation.
As a result even though database may be utf8, table fields get set up with latin1_swedish_ci collation which messes up international character support.

Issue report

Minor
Have not tried
Unix (PHP 5.2.X) (I think)
Streber 0.078 upon upgrade from
(2007-01-04 16:41)
International characters entered get messed up
At the database installation script add the CHARACTER SET utf8 and COLLATION utf8_unicode_ci (or utf8_generic_ci) options to the CREATE TABLE commands to have correct utf8 support.
(For correct entry and display of international characters)
 

6 Comments

pixtur

Jan 19, 2007
understood but...
This is an old and ugly problem. Since we support MySQL4 and MySQL5 the creation statements differ (MySQL4 does not support CHARACTER SET).

To fix this we would need two different create statements (Which would be a good idea but also a lot of work):
  1. Implement migration class
  2. Check for mySQL version if necessary on each upgrade / installation
Also note, that I had some problem upgrading a database which was created with mysql4 to utf8. I would need to somehow reencode the entered data, but I am not sure how to do this.


guest

Feb 4, 2007
View comment

before install, I edit the fiel xxx.sql, and change

) TYPE=MyISAM;

to

) TYPE=MyISAM DEFAULT CHARSET=utf8;

It's working well for me on v0.078. But it's not working well on v0.079.

pixtur

Feb 5, 2007
Interesting
I am not sure what causes this. Maybe it has something to do with ganesh's optimized installation, but I rememeber that this was already in with v0.078.

What precisely is happening?


guest

Feb 6, 2007
View comment
There're some mistake in the database created by streber installer.
The Collation is not set to utf8_general_ci. After I correct this throught phpmyadmin, it's working well now!

pixtur

Apr 25, 2007
Deferred to next version...
We have to figured out, who to support different install scripts for mySQL 4 and 5.

Deferred to next version

psychopath_mind

Sep 30, 2007
one tip...
to be fast for new users... why dont just create one install to work only with mysql 5+ without the upgrade option only install option, using mysql 5 and charset to utf8.
So you will attend for new users... AND some old users will prefer reinstall it for new version. Then you think how to make both working with one installl
[]s
 

Comment / Update