Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 PHP 元素转换à为’默认的 utf8 字符?
à
’
我尝试 html_entity_decode 没有成功(我显示一些?代替à和’代替’)
?
您遇到编码问题。html_entity_decode默认输出 iso-8859-1。我?假设您使用的是 utf-8。
html_entity_decode
尝试这个:html_entity_decode('à', ENT_COMPAT, 'utf-8')
html_entity_decode('à', ENT_COMPAT, 'utf-8')
html_entity_decode(utf8_decode('’'));