可能是一个非常简单的问题,但我想知道如何将 utf8 字符解码为可读字符。
例如 :
L'heure suprême
进入
L'heure 至上
我尝试了以下方法:
utf8_encode , utf8_decode And `html_entity_decode($string, ENT_COMPAT, "UTF-8");`
例如,输出从未给我正确的字符
html_entity_decode($string, ENT_COMPAT, "UTF-8"); returned L'heure suprême
编辑:这是一个愚蠢的问题, html_entity_decode($string, ENT_COMPAT, "ISO-8859-15");
成功了