您的位置:首页 > 产品设计 > UI/UE

解决xml_parse(): input conversion failed due to input error

2013-05-22 10:35 477 查看
1.解决xml_parse(): input conversion failed due to input error

错误原因:xml中存在无法转换的字符;
解决:
步骤1、通过mb_detect_encoding函数,获取xml的编码;
步骤2、通过mb_convert_encoding函数转成指定的编码,或使用iconv,但编码参数需加上//IGNORE;
步骤3:通过正则将<?xml …. encoding=”gb2312″ ..?>中的gb2312替换为指定编码;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐