0

I am getting  characters in my HTML page where a space should be even though I have included:

<meta charset="UTF-8">

in my <head> tag; which seems to be the common solution to this issue.

I have googled around a lot and have been unable to reach any solution. I have seen a few people run into this issue due to their IDE or editor saving their project with the wrong encoding.

I use IntelliJ on this project but I have been unable to find a reason to believe that the IDE is causing my issue.

Has anyone seen or resolved this issue before?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Aaron Rosano
  • 153
  • 1
  • 1
  • 4
  • Maybe take a look at your HTML file using a different editor or try setting the encoding in your browser manually (usually "View" - "Encoding") to narrow down the issue? – Matthias Jan 05 '16 at 22:51
  • 1
    Including `` does not magically make the data you're serving UTF-8. What encoding is the file saved as? – Matt Ball Jan 05 '16 at 22:53
  • 1
    If the unexpected character appears instead of a space character, then it follows that the actual character in the document is not, in fact, a space. Supposing that the file has been passed through an editor, especially a general-purpose word processor such as MS-Word, one reasonably likely possibility is that it is a literal non-breaking space character, in some encoding. If it's supposed to be a space then the best solution is to edit the document to make it one. – John Bollinger Jan 05 '16 at 22:57
  • I tried setting the encoding manually in in browser, no luck. @MattBall I am not sure what index.html is saved to be encoded as nor how to save it as a specific encoding. – Aaron Rosano Jan 05 '16 at 23:18
  • One possible reason for this behaviour is that the `` command does not have the last word on which encoding to use. Check if the http header sends a `charset` parameter in its `content-type` part; `` cannot override that, not even with a `http-equiv` attribute. – Mr Lister Jan 13 '16 at 17:03

1 Answers1

1

I had this problem before and it ended up being invisible characters of all things...yes....invisible characters! Go back to where your content is inputted and delete the area around the Â. By that I mean select from the word before the  all the way through the word after it and delete all of it. Then manually type it back in (don't copy paste)

Stormy
  • 93
  • 1
  • 7
  • So the issue with this is that the character is showing up in html that is created based on data received from the server and then displayed on the page (all through AJAX). – Aaron Rosano Jan 05 '16 at 23:17