htmlazureencodingazure-static-website-hosting

Azure Static Websites encoding apostrophes and other characters in a weird way


Here's what this text looks like when I load the HTML locally in Chrome:

enter image description here

On the contrary, here's what it looks like rendered after I publish to Azure Static Websites:

enter image description here

Apostrophes, quotations, and other characters are being rendered as some weird text.

What's the cause of this? Why does it happen only when published? Seems like an Azure bug to me.


Solution

  • check if you have this line in the head section

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>