解决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替换为指定编码;
错误原因:xml中存在无法转换的字符;
解决:
步骤1、通过mb_detect_encoding函数,获取xml的编码;
步骤2、通过mb_convert_encoding函数转成指定的编码,或使用iconv,但编码参数需加上//IGNORE;
步骤3:通过正则将<?xml …. encoding=”gb2312″ ..?>中的gb2312替换为指定编码;
相关文章推荐
- conversion to dalvik format failed with error 1的解决办法
- 丢失Android系统库或者Conversion to Dalvik format failed with error 1错误的解决
- 解决Test running failed: Instrumentation run failed due to 'java.lang.IncompatibleClassChangeError'
- Android打包APK遇到的错误]conversion to dalvik format failed with error 1的解决办法
- 在android中使用proguard混淆代码出现“Conversion to Dalvik format failed with error 1”错误的解决方法
- conversion to dalvik format failed with error 1的解决办法
- (转)conversion to dalvik format failed with error 1的解决办法
- Android 错误提示:Conversion to Dalvik format failed with error 1 解决办法
- conversion to dalvik format failed with error 1的解决办法
- [Android]使用ProGuard遇到“conversion to Dalvik format failed with error 1”错误的解决办法
- 丢失Android系统库或者Conversion to Dalvik format failed with error 1错误的解决
- android中使用代码混淆出现Conversion to Dalvik format failed with error 1错误的解决办法
- conversion to dalvik format failed with error 1的解决办法
- 工作流内部错误(The workflow failed to start due to an internal error.)的解决
- 使用ProGuard遇到“conversion to Dalvik format failed with error 1”错误的解决办法
- Android 错误提示:Conversion to Dalvik format failed with error 1 解决办法
- conversion to dalvik format failed with error 1的解决办法
- conversion to dalvik format failed with error 1的解决办法
- 在android中使用proguard混淆代码出现“Conversion to Dalvik format failed with error 1”错误的解决方法
- Android conversion to dalvik format failed with error 1的解决办法