Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove  character

I got very strange problem. I have one php website which is running in two server. One is on Apache (Linux) and second is on IIS (WIndow). Linux Server, I just run it for demo. IIS is the actual hosting that I need to host. Even with all the same code, database, in the linux server, there's no  character. But in IIS, everywhere got  characters. I checked all the meta tag, it's utf-8. In database collation is utf-8 also. In mysql database, i got those  character, but somehow, in linux, when we fetch the content from database, those  doesn't show. It just happening on IIS. Can anyone point out how can i resolve this ? Thank you.

like image 273
spotlightsnap Avatar asked Jan 28 '10 08:01

spotlightsnap


People also ask

Why is â showing up?

Characters like Â, ’ are showing up on my web site page Print. This problem is generally related to the wrong text encoding that is being supplied to your browser. The standard text coding for web pages is Western (ISO-8859-1), the iWeb software encodes all of its html pages as Unicode (UTF-8).

Why does É become Ã?

This typically) happens when you're not decoding the text in the right encoding format (probably UTF-8).


3 Answers

I had a similar issue a while ago, there are some useful comments and information here - it's PHP but I believe the theory would be the same:Question 386378

like image 71
suitedupgeek Avatar answered Nov 15 '22 05:11

suitedupgeek


You also need to specify UTF-8 in the HTTP headers. With PHP:

<?php
header('Content-Type: text/plain; charset=utf-8');
?>

With Apache:

AddDefaultCharset UTF-8

The Apache setting can be placed in an .htaccess file.

like image 32
Álvaro González Avatar answered Nov 15 '22 05:11

Álvaro González


I checked all the meta tag, it's utf-8.

The browser doesn't interpret the meta tag. It's only a fallback when no http-headers are present. Right click and select "View Page Info" to see what encoding the browser actually interprets the page in.

In database collation is utf-8 also. In mysql database

Collation is irrelevant for display of characters. The charset matters however. So does the connection charset.

like image 21
troelskn Avatar answered Nov 15 '22 04:11

troelskn