How to make non english content work with Hugo?

Hi everyone,

I’m really having trouble making a simple site work with content which includes german umlauts (“äöüÄÖÜ”).

I’m on OS X El Capitan with hugo 0.19 generating the pages and I’m uploading them via a ftp client (Cyberduck) to what I believe is a linux server.

The problem is that the generated HTML pages still include umlauts. So for example if I have this content:
Über uns

the HTML file paragraph still says Über uns although I would expect to see this:
Über uns

Interestingly the built in hugo server somehow serves the pages correctly to my local browser, but If I upload the HTML pages to the server, the text on that page is displayed like this:
über uns

I hardly doubt I’m the first one trying publish non english content and I haven’t found any related post in this forum. Everything I find is related to generating valid slugs where the title of the page includes special characters, but my problem is much simpler :sweat_smile:

Maybe I’m just missing a setting that activates special character encoding when generating the pages?

Many thanks in advance!



Hugo produces valid HTML in UTF-8; it seems that somewhere along the way, that encoding is broken. Either the FTP transfer or on the Linux web server or in the browser. It is impossible to say.

If not already, you may try to specify the content type and encoding in your template:

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

Nice, I think that fixed it :slightly_smiling: Thanks a lot that was super fast! I used one of the themes and modified it, obviously without really knowing what I was doing :blush: