# MySQL character problem



## debiprasad_sahoo (Jan 27, 2008)

*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.


----------



## Garbage (Jan 27, 2008)

I think, u need Unicode support to appear these texts clearly.


----------



## debiprasad_sahoo (Jan 27, 2008)

Garbage said:


> 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?


----------



## Zeeshan Quireshi (Jan 27, 2008)

*www.shawnolson.net/a/946/unicode-data-with-php-5-and-mysql-41.html


----------



## debiprasad_sahoo (Jan 27, 2008)

<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.


----------



## debiprasad_sahoo (Jan 27, 2008)

I have tried this code in one html page.

```
<!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.


----------



## debiprasad_sahoo (Jan 27, 2008)

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.


----------



## amitava82 (Jan 28, 2008)

Can you please upload your php file which having this problem?


----------



## debiprasad_sahoo (Jan 28, 2008)

Thanks friend for your help in solving my problem. I got solved by using the following code:

```
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
```


----------

