Smarty: special characters get changed unwanted- utf8 [duplicate]
I've data with special characters (french accent grave). When I select with php script and output (print) it looks fine. When I pass to Smarty the characters get changed. My html has follwoing setting: meta http-equiv="content-type" content="text/html; charset=utf-8" Not su开发者_如何学Pythonre what's missing or incorrect?
gr, Patrick
Put this at the beginning of yours php file and check:
// utf-8
header("Pragma: no-cache"); header('Content-type: text/html; charset=utf-8');
// mbstring UTF8 coding (optional)
mb_detect_order(array('UTF-8', 'ASCII')); mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); mb_regex_encoding('UTF-8');
精彩评论