Reputation: 29767
I'm using the "wordpress pdf templates" plugin. In my php pdf generating code, I set the type to utf-8 with this:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
When I do this, it turns the word workers' to:
workers?
If I remove the utf-8 designation it looks like this:
workers’
My code is very simple and looks like this:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<div class="post-content">
<?php the_content(); ?>
</div>
</body>
</html>
What am I doing wrong?
Upvotes: 1
Views: 1036
Reputation: 642
This could be because of an encoding mismatch.
One of the places to check is your wp-config.ph since that is one place that the encoding is also defined. Ref: https://www.tipsandtricks-hq.com/how-to-fix-the-character-encoding-problem-in-wordpress-1480
Also note that you have a potential for problems to occur anywhere that one part of your system talks to another. Some of these components are:
Ref: https://webmonkeyuk.wordpress.com/2011/04/23/how-to-avoid-character-encoding-problems-in-php
Upvotes: 1