gteh
gteh

Reputation: 751

Funny characters in MySQL database after import

I exported and then imported a wordpress mysql database from one server to another.

On the new server, a lot of the apostrophes have turned to question mark symbols ?. When I look at the data in the database itself, the apostrophes are normal like this ' so what would be causing those characters to look messed up?

Thanks

Upvotes: 1

Views: 363

Answers (2)

mariana soffer
mariana soffer

Reputation: 1853

You should use the corresponding collation in the select, for example

SELECT k FROM t1 ORDER BY k COLLATE latin1_german2_ci;

One common collation name could be SQL_Latin1_General_Cp1254_CS_AS

here is a list of collation names:http://msdn.microsoft.com/en-us/library/ms180175.aspx

Upvotes: 0

unutbu
unutbu

Reputation: 880359

Perhaps run SHOW CREATE TABLE tablename on both servers. The difference might be related to the CHARSET.

Upvotes: 2

Related Questions