admin管理员组

文章数量:1122832

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

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

Share Improve this question asked Jul 18, 2017 at 14:13 Dhaval PanchalDhaval Panchal 1114 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 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.

本文标签: character encoding problem in custom template