0

I am working on a website where I am using a custom template.

My site having German character. When I use the visual editor(without template) it displays perfectly. Link

But when I am using a custom template for static content it won't show German characters. Link

1 Answer 1

1

Maybe it is caused by commenting out the charset meta tag? You should have this in your header:

<meta charset="utf-8" />

You can see in your source that this meta tag is commented out - maybe while debugging this problem.

<!--<meta charset="UTF-8">-->

Additionally you could check if your database settings are set to utf8_general_ci or the recently by Wordpress implemented standard utf8mb4_unicode_ci (COLLATE) in phpmayadmin.

EDIT: You could as well check if your templates are saved as utf8 and insert the content by first pasting it into an text editor that removes unvisible formats. Sometimes if you copy text from a pdf file you can have issues with some characters.

3
  • I uncomment charset meta but no luck, and my database tables are in utf8mb4_unicode_ci format. Should I change it to utf8_general_ci? Commented Jul 19, 2017 at 4:45
  • No don't change, utf8mb4_unicode_ci is correct! Did you check if your template file is saved as utf8 by your (offline-)editor?
    – Luckyfella
    Commented Jul 19, 2017 at 7:07
  • I found an alternative solution. now I am using HTML entity for all German characters. Commented Jul 19, 2017 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.