Saturday, November 3, 2012

Black Diamond with Question Mark �

If you see that character (� U+FFFD "REPLACEMENT CHARACTER") it usually means that the text itself is encoded in some form of single byte encoding but interpreted in one of the unicode encodings (UTF8 or UTF16).

To fix this you have to tell your browser that you need to display characters from the iso-8859-1 set so it will know how to render them correctly, put the following in HEAD tag of HTML page.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
for programming languages such as PHP set the content type header to
<?php header("Content-type: text/html; charset=iso-8859-1"); ?>

4 comments:

Xantha Contreras on November 21, 2012 at 2:16 AM said...

I have used this facility in HTML but I don't used in PHP.I was unknown this facility in PHP,which I could gain from your site.

500 YouTube Subscribers on April 11, 2018 at 9:15 PM said...

it’s kind of funny how it shows on windows😅

Ateeque Rehman on May 5, 2018 at 8:59 PM said...

Still not working please tell me the proper code.

Sudath Liyanarachchi on March 3, 2022 at 3:13 AM said...

Thank you it is working

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems