UTF-8 special characters not working in the header file

I am having a strange problem with wkhtmltopdf. While all special characters appear as intended in Footer and Content, they are not displayed in the header file or replaced with question mark blocks. All three files are built in the same way:

<!DOCTYPE html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
</body>
</html>

      

Is there some trick to tell the header to use utf-8? By the way, I already tell wkhtmltopdf to use utf-8 not only as meta, but also in the script call:

--encoding utf-8

      

EDIT: I am using the html header (as you can see in the code I posted). All three HTML files are structured the same way. But while it works in content, the title doesn't like my special characters. Maybe the problem is that the content in the header comes from the $ _POST variable, and in the content, the text is built from db?

+3


source to share





All Articles