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

0

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.

  • 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? – Dhaval Panchal Jul 19 '17 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 Jul 19 '17 at 7:07
  • I found an alternative solution. now I am using HTML entity for all German characters. – Dhaval Panchal Jul 19 '17 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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