Jump to content

how to export UTF-8 data


anatak

Recommended Posts

I have a database I use for development and now I want to update the online database.

 

When I export the offline database and then import it into another database the utf-8 text is messed up.

 

here is what I did for testing.

create an empty database test with

charset utf8

connection collation utf8_unicode_ci

database collation utf8_unicode_ci

 

after that I export the development database using export

SQL format

sql compatibility mode NONE

export structure

-add auto_increment

-enclose table and field names with backquotes

export data with

-complete inserts

-extended inserts

max length 50000

use hexadecimal for binary fields

export type INSERT

 

save as file

 

 

import the file in the test database and all the utf-8 data is messed up.

 

I tried with compressed file but that does not help

 

any help would be greatly appreciated.

 

anatak

Link to comment
Share on other sites

I found the reason why my db behaved like it did.

the database I used for developing was with

database collation utf8 (beta)

the copy I made is with collation latin (info)

 

the export of the copy I made was loaded in an utf database. (copy info)

 

If I change the collation of the database "copy info" from utf to latin the data is displayed correctly.

 

the thing that still puzzles me is that the tables are all on collation utf.

 

What does the collation of the database defines ?

 

thank you for the set names suggestion.

that got me on the right track.

 

anatak

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.