469,344 Members | 6,281 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Displaying Special characters(like«) From SQL in Internet Explorer

If i store the string which contains special characters(«) in MySQL database ,it stores
special characters as it is. But when i try to diplay that string using HTML & queries, it shows '?' character for « in Firefox & shows some another character in Internet Explorer.
Please try to answer that!
Aug 30 '07 #1
2 1918
mwasif
801 Expert 512MB
Are you setting page character set to UTF-8? If not, use the following tag between <head> and </head? tags
Expand|Select|Wrap|Line Numbers
  1. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Aug 30 '07 #2
pbmods
5,821 Expert 4TB
Heya, Raju.

You also need to make sure that you are fetching the data as UTF-8. Try calling this when you connect to the database:
Expand|Select|Wrap|Line Numbers
  1. mysql_query("SET NAMES 'utf8'");
  2. mysql_query("SET CHARACTER SET 'utf8'");
  3.  
Aug 30 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by QueenArenA.com | last post: by
1 post views Thread by Christian Schmidbauer | last post: by
4 posts views Thread by Carolina | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.