PhpMyAdmin import/export - strange character encoding issues.

Posted by John Hunt on Server Fault See other posts from Server Fault or by John Hunt
Published on 2011-01-12T03:41:24Z Indexed on 2011/01/12 3:55 UTC
Read the original article Hit count: 322

Hello,

I'm migrating a site to a new host, and there are a couple of databases on there. There's no SSH access so I'm stuck with phpmyadmin. The issue is that certain characters (namely just whitespace) seems to being corrupt on the new site (same html, and apache doesn't seem to be messing with any encodings - you can see the strange characters have changed when I use less on my linux machine after downloading a table dump from both servers.)

The issue isn't as bad if I import into the new database as utf-8 - whitespace characters only have one funny A type symbol instead of two.

I've been trying various combinations of character encoding etc to no avail.

Exporting from:

  • phpMyAdmin 2.6.2 MySQL 4.1.20 MySQL
  • connection collation: utf8_general_ci
  • MySQL charset: UTF-8 Unicode (utf8)
  • Collation on tables and their fields
  • is: latin1_swedish_ci

Importing to:

  • phpMyAdmin - 2.11.9.2
  • MySQL client version: 5.0.45
  • MySQL charset: UTF-8 Unicode (utf8)
  • MySQL connection collation: utf8_general_ci

The import sql has this kind of thing in it:

ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=192 ;

I get the impression this is actually a bug or something with mysqldump as nothing seems to work.. does anyone have any insight into this?

Cheers, John.

© Server Fault or respective owner

Related posts about mysql

Related posts about phpmyadmin