Charset Issue: PHP outputs question marks on page
This is how it looks on Firefox and Chrome.
� What is a Premier Listing?
This is how it looks in the netbeans IDE.
ï¿½ <a>What is a Premier Listing?</a><br>
This is how it looks like in Atom Editor.
� <a>What is a Premier Listing?</a><br>
I tried changing the charset in the html file and also tried changing it in the PHP side but no effect.
The symbols ï¿½ and � are on the html file itself. My question is 'is there a way to correct this error that we are seeing to the browser show the correct symbols?'
This is happening because someone copied and pasted those actual characters into the code. They are not UNICoded that way, or anything like it. It's actual characters. Like, someone copied the page in a rendered state when the characters were not rendered properly.
The only fix for this now is to do a search and replace in your code to put the correct characters in place.
I've seen this happen many times when someone pastes text into code directly from Word or something, and they end up with SmartQuotes. They look fine in the code editor. Then the page renders, and you get gobblygook. If you copy and paste that gobblygook into your code, you get hardcoded gobblygook and nothing more. That is precisely what happened here.