Set encoding to UTF-8

Hi all,
I noticed some problems with german umlaute (ä, ö, ü, ß). They are not displayed correct. Even worse, these umlaute seem to some kind of crash the interpreting because also the page properties (title etc.) are not interpreted but shown on the page… In thread Problems with vowel mutations I’ve found the solution. I’ve added AddDefaultCharset utf-8 add the bottom of .htaccess of root path but it did not fix the problem. So I’ve set the encoding in my Notepad++ to ‘Encoding in UTF-8 without BOM’ because setting ‘Encoding in UTF-8’ did not fix the problem. So now it’s displayed fine, but I’m very sure I will forget to change it to this setting every time I create a new file. And it’s also difficult to explain to other editors :frowning:
Is it somehow possible to set the encoding to UTF-8 by default so it does not matter which encoding is set in the editor?

Can you try putting this in your HTML header:

<meta charset="utf-8">

Does that help?

BTW, this is something that is already set in the Antimatter theme in the templates/partials/base.html.twig file. Other than that, you do need to set UTF-8 as your default encoding type in your editor if you are using UTF-8 characters in your text. I suggest using Sublime Text Editor as I’m pretty sure it defaults to this.

Oh no, that would be really bad :frowning: I’m importing files from another source, and there I could set encoding to ‘UTF8’, but as already said with Notepad++ at the first post, ‘UTF8’ does not fix the problem. In Notedpad++ I have to select ‘utf8 without BOM’ (whatever this means). But this option does not appear there :frowning: Is there no way to ‘hardcode’ UTF8?

The encoding of the file is something that is set in the file itself. You either have to save them in UTF-8, or convert them. There are plenty of options for converting though. Just google for it:

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=batch+convert+files+to+utf8

OK, Managed to build them using UTF8 without BOM. Thanks rhukster!

Hi Kai, i have the same Problem with German umlaut (ä,ö,ü,ß). How have you solved the problem? The files are all in UTF8 but it will not display correctly? Utf_file

The Original /01.home/default.md File has ASCII/UTF8 and my converted files Unicode/UTF8 [Original_home_default_md_file] This is really confusing? Original_home_default_md_file

Did you save as UTF8 without BOM?

hi
Use UTF-8 folder name, this page is 404 error.
Collection of this page(this URL is non-UTF-8) display correct.
I’m using GRAV0.9.35 with stripe site.

folder names need to be valid slugs… so no special characters.

Sorry, I didn’t know that.
I was using UTF-8 URLs in old version (Grav 0.9.9).
thx.