Reputation: 210
When I save in an editor (Notepad++) an HTML file as "utf-8" encoded the meta tag charset (=ISO-8859-2) seems to be ignored by browser (charset is always set to "utf-8", not matter which encoding i have set in meta tag)
What's more interesting when i save this doc as "ANSI" encoded file changing tag charset works...
Can You please explain me such a behaviour?
Upvotes: 0
Views: 1103
Reputation: 522606
"UTF-8" in Notepad++ really means "UTF-8 with BOM". The leading BOM very likely triggers UTF-8, regardless of what anything else is saying, since no other document should start with that particular byte sequence. Try saving as "UTF-8 without BOM" to see the difference.
Upvotes: 1