I want to have a header include in my HTML pages to avoid changing any page in case I have header changes as the header can grow easily.
Problem:
Expected textoutput : "Schüttgut"
Received textoutput: "Schüttgut"
Here is what I did:
Creating a header - saved as inc_head.html:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Including w3 at the end of the index.html page
<script src="https://www.w3schools.com/lib/w3.js"></script>
<script>
w3.includeHTML();
</script>
Setting the head-part in the index-page like
<head>
<div w3-include-html="inc_head.html"></div>
</head>
Opening the page shows that the UTF-coding is not working, I receive "ü" signs instead of "ü". When I replace the w3-include part directly by the two header lines it works correctly.
Any idea why the include fails for this special-chars? Thank you