0

Whilst running a code on notepad ++ that makes traffic lights run automatically I notices that this sign pop ups next to one of the buttons, ​. I did some research and found out that to make it go away I need to specify the charset to equal utf-8. I did this and the sign went away however I am confused because the default character encoding in HTML5 is utf-8 and it is even shown in notepad that it is using utf-8.

I was wondering if someone could tell me why the sign pops up considering the fact that it was already encoded in utf-8.

Josh
  • 1
  • 1

1 Answers1

0

There are a number of things that all need to be set to UTF8.

The original file, of course, needs to be UTF8.

However, there is also an HTML header that specifies the encoding of the file. If this header is set incorrectly, the browser may try another encoding.

So, using a specific over-ride in the HTML file can "work around" this issue.

There a bit of discussion here: <meta charset="utf-8"> vs <meta http-equiv="Content-Type">

Community
  • 1
  • 1
Jeremy J Starcher
  • 23,369
  • 6
  • 54
  • 74