943,102 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Marked Solved
  • Views: 596
  • MySQL RSS
Feb 9th, 2010
0

Trouble displaying special characters

Expand Post »
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 Syntax (Toggle Plain Text)
  1. mysql_query("SET CHARACTER SET 'latin1'", $this->connection);
  2.  
  3. mysql_query("SET NAMES 'latin1'", $this->connection);
  4.  
  5. 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.
Similar Threads
Reputation Points: 18
Solved Threads: 2
Posting Whiz
Venom Rush is offline Offline
325 posts
since Oct 2007
Feb 9th, 2010
0
Re: Trouble displaying special characters
What content type you have set for HTML page? Did you use utf-8?
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007
Feb 10th, 2010
0
Re: Trouble displaying special characters
Click to Expand / Collapse  Quote originally posted by mwasif ...
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.
Reputation Points: 18
Solved Threads: 2
Posting Whiz
Venom Rush is offline Offline
325 posts
since Oct 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: SQL SELECT question.
Next Thread in MySQL Forum Timeline: maximum connection to mysql database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC