Thursday, December 1, 2011

htmlentities and utf8

Ever wonder why your utf8 charactors doesn't work with htmlentities?
try htmlspecialchars
Example:
$sResult = htmlspecialchars($sText, ENT_COMPAT, "UTF-8");

No comments: