首页 > 学院 > 开发设计 > 正文

ICEcoder显示汉字出现乱码的处理

2019-11-15 02:20:54
字体:
来源:转载
供稿:网友
ICEcoder显示汉字出现乱码的处理 Posted on 2015-07-20 09:37 anjo 阅读(...) 评论(...) 编辑 收藏

在网上看到icecoder这个小东西,是一个基于web的编辑器,很不错。唯一的缺点是打开的文件中汉字会变成乱码。

经查看源代码,在lib/file-control.php中,第89行是:

echo '</script><textarea name="loadedFile" id="loadedFile">'.htmlentities($loadedFile).'</textarea><script>';

原来如此,htmlentities会把汉字变成乱码,换成功能类似的htmlspecialchars:echo '</script><textarea name="loadedFile" id="loadedFile">'.htmlspecialchars($loadedFile).'</textarea><script>';

问题解决,暂时没有异常出现。


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表