[Erp5-dev] Using another character set and collation
Kazuhiko Shiozaki
kazuhiko at nexedi.com
Thu Jul 31 13:27:34 CEST 2008
Hi Boris,
Boris Kocherov wrote:
>> B. modify ERP5 to specify character set explicitly
>> --------------------------------------------------
>>
>> To take this way, your proposal 1) and 2) are not enough. It is also
>> needed to add 'DEFAULT CHARSET=utf8' at the end of *all* CREATE TABLE
>> statements (in portal_catalog/*/z_create_*).
> What is the reason to add at the end of *all* CREATE TABLE statements if
> the default character set and collation for all tables in database is
> the DATABASE character set and collation.
> http://dev.mysql.com/doc/refman/5.0/en/charset-table.html
"ALTER DATABASE db_name CHARACTER SET utf8" will not affect existing
tables in the database, and of course it is not a permanent solution. So
you have to invoke the SQL each time you set up a new ERP5 instance.
If we have 'DEFAULT CHARSET=utf8' in all CREATE TABLE statements, and we
apply your patch, we no longer have to care the character set
configuration of whole MySQL or each database. This should be a
permanent solution.
> To avoid misunderstanding: i suggest to fulfill the both 1) and 2) one
> after another because after execution of my patch ERP5 sends the data to
> MySql in utf8.
Exactly, your patch guarantees that ERP5 sends the data in utf8. So if
ERP5 also guarantees that all tables are created in utf8, everything
should be fine.
--
Kazuhiko Shiozaki, Nexedi SA Senior Consultant
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org
More information about the Erp5-dev
mailing list