[Vtigercrm-developers] UTF-8 support for Migration

Minnie A minnie at vtiger.com
Thu Jan 24 22:23:34 PST 2008


Dear Team,

We would like to get the help from you regarding UTF-8 related issues in
Migration.

The following steps are used to migrate from 5.0.3 to 5.0.4 latest svn
source, where as default character set is latin1 for 5.0.3 database and now
for the latest source we have to convert those data as utf8 compatible
(because default character set for 5.0.4 database is UTF-8)
So that after migration we should see the previously entered UTF-8
characters (ie., data available in 5.0.3) as it is in 5.0.4

1. Take the dump of 503 database
Eg : mysqldump -u root --port=5030 -h minnie vt503 > vt503.sql

2. Edit the dump file, find and replace the string "latin1" with "utf8" in
all places of the dump file. (Also added SET FOREIGN_KEY_CHECKS=0; at the
first line and added SET FOREIGN_KEY_CHECKS=1; at the last line in the dump
file)

3. For 504, create a database with default charset utf8.
Eg : create database vt503 default character set utf8 default collate
utf8_general_ci;

4. Apply the dump to this newly created database
 Eg : mysql -u root --port=5080 -h minnie vt503 < vt503.sql

5. Include the fix in include/database/PearDatabase.php file (Stored this
attached zip file under document root ie., parellel to config.inc.php and
unzipped). In SVN, refer the change set
http://trac.vtiger.com/cgi-bin/trac.cgi/changeset/11854

6. Run the migration (from 5.0.3 to 5.0.4)

Kindly test it and let us know the status of this fix. Also please ensure
that you have utf8 characters in 5.0.3 and are display correctly in 5.0.3.
So that after migration we have to check whether those characters are
displaying correctly in 5.0.4 migrated.

Issue : The characters which are stored in 503 db as html values(like
&#1607;&#1584;&#1575;
&#1607;&#1608;) will display as it is. Currently we are working on
converting these html values to its original chars. If we get any solution
let you know.

We expect your suggestions/solutions to handle the convertion of latin1
database to utf8 to display the utf8 characters correctly after migration.

Thanks & Regards,
Minnie.
vtiger Team.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20080125/689f79d9/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: migration.zip
Type: application/zip
Size: 7506 bytes
Desc: not available
Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20080125/689f79d9/attachment-0003.zip 


More information about the vtigercrm-developers mailing list