954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Trouble displaying special characters

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.

Venom Rush
Posting Whiz
350 posts since Oct 2007
Reputation Points: 31
Solved Threads: 2
 

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

mwasif
Posting Whiz
315 posts since Dec 2007
Reputation Points: 29
Solved Threads: 48
 
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.

Venom Rush
Posting Whiz
350 posts since Oct 2007
Reputation Points: 31
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You