[Erp5-dev] Using another character set and collation

Boris Kocherov bkocherov at gmail.com
Thu Jul 31 14:45:52 CEST 2008


Kazuhiko Shiozaki пишет:
> 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.
that's why you have to clean and reindex catalog.
> 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.
Yes, we have to invoke the SQL query each time you set up a new ERP5 
instance. But if i understand correctly you have a private patch for new 
ERP5 instance creating so - it's easier to include the SQL query there 
once than be afraid of forgetting to add text to each "Create table".
> 
>> 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.




More information about the Erp5-dev mailing list