Hi all

I'm having trouble displaying special characters. I have a database that has a number of characters from different languages and I've managed to display almost all of them. But I still have some characters showing up as a question mark inside a diamond.

The code I'm using in my php script is as follows:

mysql_query("SET CHARACTER SET 'latin1'", $this->connection);
		
mysql_query("SET NAMES 'latin1'", $this->connection);
		
mysql_query("SET collation_connection = 'latin1_general_ci'");

Can anyone suggest what I can do to fix this? I'm pretty certain these characters are curly apostrophes/inverted commas.

Any help will be greatly appreciated.

Recommended Answers

All 2 Replies

What content type you have set for HTML page? Did you use utf-8?

What content type you have set for HTML page? Did you use utf-8?

Yes I set it to utf-8.

Solved the problem this morning. Seems that we just needed to paste the characters over the diamonds and update the records in order for them to display.

Everything seems to be displaying correctly now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.