使用phpmyadmin进行数据库传输 - 编码问题

I am transfering the database from one server to another server using phpmyadmin. I successfully transfered it but having issue with swedish characters. I can see the swedish characters are displaying properly within the tables but in php pages it is wrong seems like double encoded or any other problem. Can anyone help?

The problem could be lying in different parts. Welcome to the world of Unicode!

  1. Make sure the collation for the columns in MySQL is utf8_* (I personally prefer utf8_bin).
  2. Make sure the PHP page is telling the client that the contents are encoded with UTF8. That can/should be done in two ways:
    • Set the following header: header('Content-Type: text/html; charset=utf-8');
    • In your HTML <head> add the correct meta tag: <meta charset="utf-8">
    • (note: while in theory it's not strictly necessary to do both, as they're equivalent for the client, it's better to be redundant!)
  3. Make sure the connection with MySQL uses UTF8. That can be done by executing a simple query right after the connection to the database: SET NAMES 'utf8' (e.g. mysqli_query("SET NAMES 'utf8'"); alter it accordingly if you're using PDO or the MySQLi OOP APIs).

Bonus: if you're using UTF8 in your PHP script, make sure you treat everything in an Unicode-safe way. So, prefer using mb_* functions to manipulate strings, use the u flag with preg_* functions, etc. And remember than UTF8 characters are variable in the number of bytes they use, from 1 to 4!

I have same setting for my both website only problem is with database after transfering it to an other server. Encoding of pages are same on both sites.

you can check it here

http://www.abswheels.se

http://www.dackis.se/abs/

you can see the difference. any sugguestions??

also everything is fine inside the database. I dont know why when i fetch the data with special character from database it has a problem. you can see the title bar of both website. everything is same on client side. same encoding same setting