Skip to content

Anthony L Rivera

Director of Engineering | New York City

  • Blog

PHP Encoding issues

Posted byprv8admin April 11, 2016April 11, 2016

Had an issue we were running into regarding encoding while trying to render content that had been parsed by DOMDocument()

utf 8 – Getting ’ instead of an apostrophe(') in PHP – Stack Overflow

Solution:
echo mb_convert_encoding($content,"HTML-ENTITIES","UTF-8");

mb_convert_encoding is your friend 🙂

Posted byprv8adminApril 11, 2016April 11, 2016Posted inDevTags: encoding, php

Post navigation

Previous Post Previous post:
Hong Kong
Next Post Next post:
Clark – Death Peak
Anthony L Rivera, Proudly powered by WordPress. Privacy Policy