Help with database conversion to UTF8

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
konstb
Posts: 5
Joined: 01 Feb 2008, 11:14

Help with database conversion to UTF8

Post by konstb »

Hello.
I'm upgrading from Mantis 1.0.7 to 1.1.1.
Previously I used russian_utf8 encoding for my installation, so my data already in UTF8, but if I access data from Mantis 1.1.1 (MySQL - 5.0.21, default-character-set=utf8), I see a garbage (like Хорошо бы перед) instead of correct russian symbols.
I have tried the procedure, described in http://www.mantisbt.org/wiki/doku.php/m ... de_to_utf8, but failed.
May be I do something wrong, I'm not experienced with MySQL and PHP.
Could anyone help?
I can send you any table (mantis_news_table, for example) for tests.

Sincerely, Konstantin
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Help with database conversion to UTF8

Post by Kirill »

Konstantin, take me connect
ICQ 82427351
konstb
Posts: 5
Joined: 01 Feb 2008, 11:14

Re: Help with database conversion to UTF8

Post by konstb »

OK, thanks to Kirill, the solution is found.
1) Export the data:
mysqldump -uUser -pPassword --default-character-set=latin1 bugtracker > result.sql

2) Because I previously have used russian_utf8 encoding, the strings are already in utf8 and I need just minor correction:
SET NAMES latin1 -> change to -> SET NAMES utf8
and all
DEFAULT CHARSET=cp1251 -> change to -> DEFAULT CHARSET=utf8

3) then create new MySQL database with default encoding utf8 and import data into it:
mysql -uUser -pPassword bugtracker_new < result.sql
wonn1377
Posts: 3
Joined: 24 Aug 2009, 11:28

Re: Help with database conversion to UTF8

Post by wonn1377 »

I use data loader for migrating almost any data, it helps me to convert MSSQL to MYSQL, MS access to MSSQL, mysql, csv loader, foxpro and MSSQL to MS access, MYSQl, CSV, foxpro etc. In my view this is a best Data Migration Tool


Download Free : http://www.dbload.com
wonn1377
Posts: 3
Joined: 24 Aug 2009, 11:28

Re: Help with database conversion to UTF8

Post by wonn1377 »

I use data loader for migrating almost any data, it helps me to convert MSSQL to MYSQL, MS access to MSSQL, mysql, csv loader, foxpro and MSSQL to MS access, MYSQl, CSV, foxpro etc. In my view this is a best Data Migration Tool


Download Free : http://www.dbload.com
wonn1377
Posts: 3
Joined: 24 Aug 2009, 11:28

Re: Help with database conversion to UTF8

Post by wonn1377 »

I prefer a third party applpications for migrating my data, i use data loader when i was migrating MS SQL to Foxpro it work great, and it can migrate almost any database.

Download Free : http://www.dbload.com
Post Reply