html - 2 php functions have different utf-8 output in the same document -


i have following html 2 php functions render pdf:

<html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> </head> <body> <div> summary:<?php echo get_post_meta(get_the_id(), 'summary', true); ?> </div> <div class="post-content">             content:<?php utf8_encode(the_content()); ?>         </div> </body> </html> 

they both have same content, output different.

the summary prints:

summary: let's go out

the content prints:

content: let?s go out

this leads me believe in call affecting utf-8 decoding. both database tables use: charset=utf8

how can content section render properly?

check if utf8 encode function can http://php.net/manual/en/function.utf8-encode.php


Popular posts from this blog