Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 27-01-2008, 05:07 PM   #1 (permalink)
Web Junky 2.0
 
debiprasad_sahoo's Avatar
 
Join Date: Oct 2005
Location: Chennai, Cuttack
Posts: 121
Default Special character parsing problem in php


When I stores the characters ´, ¤, ¸, •, ´, ¨, », ` & ¶ in MySQL, it stores successfully and shows correctly in phpMyAdmin. But when I get the data and displays in web page it dispays � instead of the original character. Please help.

Differnt broswers display this [ � ] in different way. IE displays a box where FF displays a question mark.

I have coded some special characters in the php files. It is not able to display correctly in output. But phpMyAdmin able to display.
__________________
More reason to love orkut
Get Scraps, Testimonials and many more...
http://loveorkut.com/

Last edited by debiprasad_sahoo; 27-01-2008 at 08:53 PM.
debiprasad_sahoo is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 27-01-2008, 05:19 PM   #2 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: MySQL character problem

I think, u need Unicode support to appear these texts clearly.
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline  
Old 27-01-2008, 05:31 PM   #3 (permalink)
Web Junky 2.0
 
debiprasad_sahoo's Avatar
 
Join Date: Oct 2005
Location: Chennai, Cuttack
Posts: 121
Default Re: MySQL character problem

Quote:
Originally Posted by Garbage View Post
I think, u need Unicode support to appear these texts clearly.
As it is a php page, I think my php interpreter can not convert this characters while parsing. What to do?
__________________
More reason to love orkut
Get Scraps, Testimonials and many more...
http://loveorkut.com/
debiprasad_sahoo is offline  
Old 27-01-2008, 07:15 PM   #4 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: MySQL character problem

http://www.shawnolson.net/a/946/unic...-mysql-41.html
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline  
Old 27-01-2008, 09:02 PM   #5 (permalink)
Web Junky 2.0
 
debiprasad_sahoo's Avatar
 
Join Date: Oct 2005
Location: Chennai, Cuttack
Posts: 121
Default Re: MySQL character problem

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

The problem may be here. How to fix this?

I have tried by removing this line form the code, but it is not working. I tried in another file by not using any meta tag it displayed all correctly.
__________________
More reason to love orkut
Get Scraps, Testimonials and many more...
http://loveorkut.com/

Last edited by debiprasad_sahoo; 27-01-2008 at 09:17 PM.
debiprasad_sahoo is offline  
Old 27-01-2008, 10:05 PM   #6 (permalink)
Web Junky 2.0
 
debiprasad_sahoo's Avatar
 
Join Date: Oct 2005
Location: Chennai, Cuttack
Posts: 121
Default Re: MySQL character problem

I have tried this code in one html page.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>

 ´´´´´´´´´´´´´´´´´¶ ´´´´´´´´´´´´´´¶´´¶´´´¶¶ ´´´´
</body>
</html>
The display is ok. It ables to display unicode.

It is very confusing. In some of the pages from this localhost server, if I hard code these characters is is displaying, and some where is is not displaying. phpMyAdmin uses utf-8 encoding where I can see these characters.
__________________
More reason to love orkut
Get Scraps, Testimonials and many more...
http://loveorkut.com/

Last edited by debiprasad_sahoo; 27-01-2008 at 10:14 PM.
debiprasad_sahoo is offline  
Old 27-01-2008, 11:21 PM   #7 (permalink)
Web Junky 2.0
 
debiprasad_sahoo's Avatar
 
Join Date: Oct 2005
Location: Chennai, Cuttack
Posts: 121
Default Re: MySQL character problem

I found the problem. The problem is with the design (template) which I use. Please help me to fix this.

I am totally confused. If I create one html file using this template it displays these characters. But when I create a php file it unable to display. Simple php file without this template works.
Attached Files
File Type: zip CrystalX.zip (31.0 KB, 2 views)
__________________
More reason to love orkut
Get Scraps, Testimonials and many more...
http://loveorkut.com/

Last edited by debiprasad_sahoo; 27-01-2008 at 11:50 PM.
debiprasad_sahoo is offline  
Old 28-01-2008, 01:12 AM   #8 (permalink)
MMO Addict
 
amitava82's Avatar
 
Join Date: Jul 2004
Location: Bangalore
Posts: 1,474
Default Re: MySQL character problem

Can you please upload your php file which having this problem?
__________________
Steam Profile || Personal Page
Warp drive active. Approaching stargate.
amitava82 is offline  
Old 28-01-2008, 10:13 PM   #9 (permalink)
Web Junky 2.0
 
debiprasad_sahoo's Avatar
 
Join Date: Oct 2005
Location: Chennai, Cuttack
Posts: 121
Default Re: MySQL character problem

Thanks friend for your help in solving my problem. I got solved by using the following code:
Code:
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
__________________
More reason to love orkut
Get Scraps, Testimonials and many more...
http://loveorkut.com/
debiprasad_sahoo is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Problem!!! gursimran_2006 QnA (read only) 3 18-10-2006 04:46 PM
Mysql Installation Problem.. dreams QnA (read only) 4 15-12-2005 07:47 AM
One PHP MYSQL problem demoninside Open Source 4 21-06-2005 12:26 AM
sp2 problem with mysql technomodel QnA (read only) 2 10-11-2004 10:31 PM

 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2