Zen Cart Logo
Forums / General Questions / Exporting db with specials characters

Exporting db with specials characters

Locked

Views: 1,726

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 Jul 2006, 4:02 AM
#1
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

Exporting db with specials characters

I want to export the db for backup and for import in other site.
The db contains words in spanish and french language, and with phpmyadmin some particular characters are corruptad.
I can'use the module BACKUP_MYSQL_ADMIN_PLUGIN-1.2.0.10a because my server can't modify for me the php set up (problem af "safe_mode"):
I can't also use the "bin" mode, because I must change the name of the database before to import in another site.
What can I do??? - Many thanks .- Giovanni

5 Jul 2006, 9:52 AM
#2
marw avatar

marw

New Zenner

Join Date:
Feb 2006
Location:
Hungary
Posts:
39
Plugin Contributions:
0

Re: Exporting db with specials characters

Hi!

I don't know what could cause your problem, PHPMyAdmin should save the backup file with the same charset as your tables. I guess the characters are displayed fine on your site.

What charset do you use in your DB? If you type the same characters manually in the txt file, are they saved properly? If not, then this will be a charset problem with the txt file.

Here's a workaround, if nothing else works:

  1. Save the backup in a txt file.
  2. Open it in your editor.
  3. Replace the corrupted characters with the originals. (Edit/Replace in MS Notepad for example)
  4. Save the file with the correct charset.
  5. Upload to the DB.

Good luck, and don't forget to save everything before you try these.

6 Jul 2006, 4:08 AM
#3
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

Re: Exporting db with specials characters

Many thanks to Marw!
The character-set of the db is
MySQL charset: UTF-8 Unicode (utf8)
an I've tried the MySQL connection collation:

ut8_general_ci
ut8_unicode_gi
latin1_general_ci and others, but letters as à,ò,è,é and others are alwais corrupted. What do you think??
Again Thanks

6 Jul 2006, 6:32 AM
#4
marw avatar

marw

New Zenner

Join Date:
Feb 2006
Location:
Hungary
Posts:
39
Plugin Contributions:
0

Re: Exporting db with specials characters

I use the same, so I'll try it and see if I can figure it out.

Give me a couple of hours for this, I'm at work now and they always try to keep me away from my site with any boring tasks they can come up with. The same happened today, but I'll report back as soon as I found something.

6 Jul 2006, 8:11 AM
#5
marw avatar

marw

New Zenner

Join Date:
Feb 2006
Location:
Hungary
Posts:
39
Plugin Contributions:
0

Re: Exporting db with specials characters

OK, I've checked it.

I also use UTF-8 charset in my database, with lots of non-english characters like ó,ő,ú,ü,ű,á,é etc.

Here's what I've done:

  1. Checked the table, everything looks fine in PHPMyAdmin and on the website
  2. Exported a table containing special characters (followed the step-by-step instructions in the FAQ)
  3. Checked the saved file in
    MS Notepad: special characters are corrupted
    MS Wordpad: the same
    MS Word: if you import it with UFT-8 selected, everything is OK
    MS Internet Explorer: corrupted by default, but OK if you select UFT-8
    I'll check it with Linux when I get home, but I expect similar results.
  4. Tried to import the saved .sql file into the database with PHPMyAdmin, again following the instructions in the FAQ, selecting the UTF-8 charset at the bottom of the screen.
  5. Checked the DB table again, everything's fine.

So if you see the corrupted characters in the saved .sql file only, then it may only be a problem with the text editor you use, it shouldn't mess up the new DB table as long as your new DB name doesn't contain any special characters.

Hope it helps, good luck!

7 Jul 2006, 3:59 AM
#6
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

Re: Exporting db with specials characters

Incredible!!
I normally use the Supernotetab text editor (for the lineffeed) with wich I alwais used "stranger characters" with no problem. Well, viewing an .sql exported file, I see errors in Supernotetab and also in Wordpad, while in the simplest Notepad the characters are correct (but not recognise re RC & LF).
So it seems really to be a simple proble of text editor!
Now I have problems, and can't make test of import. I'll do tomorrow!
Really many thanks to MarW !!!!
p.s. When you say "following the instructions in the FAQ".... where are the FAQ?

7 Jul 2006, 7:43 AM
#7
marw avatar

marw

New Zenner

Join Date:
Feb 2006
Location:
Hungary
Posts:
39
Plugin Contributions:
0

Re: Exporting db with specials characters

Here is the FAQ section about DB backup/restore.

Good luck again, please report back if it was successful!

8 Jul 2006, 3:17 AM
#8
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

Re: Exporting db with specials characters

All is O.K.
Many thanks again to MarW
Giovanni