Netlify dev + custom 404 = unicode problems

I’m creating a custom 404 page for my Jekyll site that uses some HTML5 entities (“smart” single quote, non-breaking space). There appears to be a Unicode problem when I preview the site using netlify dev compared to when I use Jekyll’s own web server (webrick, I guess).

When serving the site with webrick/jekyll serve, the text looks normal. When serving the site with netlify dev, there is the usual Unicode problem where the smart single quote is rendered as ’.

All my other pages are rendered correctly when serving the site with netlify dev. So far I’ve only seen this problem on the custom 404 page. All the pages have the same <meta charset> tag set to UTF-8.

Ten minutes of searching the web did not find any helpful information. I need either better keywords or someone to step in and investigate.

Thank you!

UPDATE: As you might expect, the page looks perfectly fine in production.

Well if the problem still persists in Netlify Dev, maybe you can open an issue on GitHub so it can be fixed.

Indeed, that was my next move, but I wanted to make sure it wasn’t some well-established known issue before doing that.

UPDATE: netlify dev + custom 404 page = unicode rendering problems · Issue #1945 · netlify/cli · GitHub

1 Like