DIGIT-ARC read-only archive · snapshot: July 23, 2026

MySQL character problem

9 posts · originally from https://geek.digit.in/community/threads/mysql-character-problem.79136/

debiprasad_sahoo
debiprasad_sahoo Original post #1
Jan 27, 2008 at 5:07 PM
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
Garbage #2
Jan 27, 2008 at 5:19 PM
I think, u need Unicode support to appear these texts clearly.
debiprasad_sahoo
Jan 27, 2008 at 5:31 PM
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 at 7:15 PM
*www.shawnolson.net/a/946/unicode-data-with-php-5-and-mysql-41.html
debiprasad_sahoo
Jan 27, 2008 at 9:02 PM
<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 at 10:05 PM
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.
debiprasad_sahoo
Jan 27, 2008 at 11:21 PM
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 at 1:12 AM
Can you please upload your php file which having this problem?
debiprasad_sahoo
Jan 28, 2008 at 10:13 PM
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" />