【问题标题】:why does htmlentities() convert the symbol: ´ into ’? Shouldn't it convert into the html entity name: ´? [duplicate]为什么 htmlentities() 将符号:´ 转换为 ’?它不应该转换为html实体名称:'? [复制] 【发布时间】:2012-03-08 10:52:03 【问题描述】: 可能重复:PHP htmlentities() not working as expected 我很困惑为什么它被转换成奇怪的字符而不是´ 谁能指出我正确的方向? 【问题讨论】: 标签: php html 【解决方案1】: 使用第二个 flags 参数 - http://php.net/manual/en/function.htmlentities.php,例如 htmlentities( $string, ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8" ); 【讨论】: