| Re: latin1 to utf8 with phpMyAdmin -
06-04-2007, 07:58 AM
On 18 mayo, 12:27, Dikkie Dik <nos...@nospam.org> wrote:
> > I'm trying to convert a database with latin1 charset to utf8.
> > I have exported all data to a file using phpMyAdmin. Then, I've
> > created a new database using UTF8 charset and finally I have imported
> > all data using phpMyAdmin (removing all information about charset and
> > collation)
>
> > Tables and fields have UTF8 charset but data inside the tables are not
> > converted to UTF8 format.
>
> If you still have the original database (or convert it back to latin1):
>
> ALTER TABLE <table name> CONVERT TO utf8;
>
> Just run this query on all the tables you want to convert. That should
> be all.
>
> Best regards
Thanks. I'll try it next time.
This time I have exported database with phpMyAdmin and then I have run
a php script to convert sql file to utf8 (by the use of utf8_encode
function) Then, I have imported the sql file (what a mess!) and it
works.
Best regards. |