MySQL character problem

Status
Not open for further replies.

debiprasad_sahoo

Web Junky 2.0
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.
 
Last edited:
OP
debiprasad_sahoo

debiprasad_sahoo

Web Junky 2.0
<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.
 
Last edited:
OP
debiprasad_sahoo

debiprasad_sahoo

Web Junky 2.0
I have tried this code in one html page.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "*www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="*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.
 
Last edited:
OP
debiprasad_sahoo

debiprasad_sahoo

Web Junky 2.0
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.
 
Last edited:
OP
debiprasad_sahoo

debiprasad_sahoo

Web Junky 2.0
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" />
 
Status
Not open for further replies.
Top Bottom