Input is not proper UTF-8, indicate encoding !错误处理
xml 中如果包含部分 ascii 控制字符(小数字)则 chrome会报告如下类型错我:
This page contains the following errors:
error on line 20 at column 89: Input is not proper UTF-8, indicate encoding !
Bytes: 0x08 0xE8 0xBA 0xB2
Below is a rendering of the page up to the first error.
解决办法:replace 这些字符
public static string ReplaceXMLInvaidChar(string xmlStr)
{
return Regex.Replace(xmlStr, "[\x00-\x1F\x7F]",""); }
原因:XML 规范不支持如下字符
#x0 - #x8 (ASCII 0 - 8)
#xB - #xC (ASCII 11 - 12)
#xE - #x1F (ASCII 14 - 31)
参看文档:https://support.microsoft.com/en-us/kb/315580
原文地址:https://blog.csdn.net/isaisai/article/details/53899089
Input is not proper UTF-8, indicate encoding !错误处理的更多相关文章
- php加载xml编码错误,“Error: Input is not proper UTF-8, indicate encoding! ”
最近在给php中解析xml的时候,抛出一个错误: "Warning: DOMDocument::load(): Input is not proper UTF-8, indicate enc ...
- 十二 INPUT逻辑视图的配置,回显错误信息
Action接口中提供了五个逻辑视图的名称 SUCCESS ERROR LOGIN INPUT:input在某些拦截器会使用 NONE 配置逻辑视图:struts_demo2.xml,配置后出现错误信 ...
- 【转载】解决 Subversion 的 “svn: Can't convert string from 'UTF-8' to native encoding” 错误
转载自:http://blog.csdn.net/shaohui/article/details/3996274 在google code 上创建了一个新的项目, 用Windows 下面的tortoi ...
- SAS使用SPD引擎并报Encoding错误
ERROR: Unable to open data file because its file encoding differs from the SAS session encoding and ...
- UnSupported Encoding错误
学习struts2的时候碰到tomcat报错:org.apache.jasper.JasperException: Unsupported encoding: UTF-8,原因是jsp文件中的pag ...
- Zend Studio出现 Some characters cannot be mapped using "GBK" character encoding 错误
解决办法: Window->Profermance->General->Content Types->Text看目录下面的每个文件,包括子目录里面 Default encodi ...
- Python input 使用
Python 3.0 中使用"input" , Python 2.0 中使用"raw_input"Python 3.5: #!C:\Program Files\ ...
- 已解决】Sublime中运行带input或raw_input的Python代码出错:EOFError: EOF when reading a line(转)
[问题] 在折腾: [已解决]Sublime Text 2中运行Python程序出错:The system cannot find the file specified 的过程中,虽然解决了找不到py ...
- node进阶| 解决表单enctype="multipart/form-data" 时获取不到Input值的问题
今天在学习node踩到一个坑:form设置enctype="multipart/form-data"上传文件时,无法获取到表单其他input的值. 因为之前上传文件用的是 form ...
随机推荐
- Oracle 12C 新特性之 db默认字符集AL32UTF8、PDB支持不同字符集
一. db默认字符集AL32UTF8Specify the database character set when you create the database. Starting from Ora ...
- CentOS7自动补齐
cenos7,最小安装,做服务器嘛.但是发现tab键的自动补齐功能没有:其实可以直接把centos7作为yum源,然后直接安装bash-completion yum install -y bash- ...
- Centos下安装禅道
1.下载禅道安装包:http://dl.cnezsoft.com/zentao/9.7/ZenTaoPMS.9.7.stable.zbox_64.tar.gz 2.将下载的压缩包解压到/opt目录下: ...
- Visualforce Page超链接
Salesforce开发者文档:https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start ...
- IHE 官方网址有用资源介绍
实现标准: http://www.ihe.net/Technical_Frameworks/ 各个实现框架文档, 比如XDS,XCA,PIX,PDQ等 测试工具:http://www.ihe.net/ ...
- UIButton 不同状态图片来回切换
做百度地图是否显示路况信息,用到两种状态的图片 第一种方法:用Bool进行标记 声明一个 Bool _isRoad; - (void)roadBtnAction:(UIButton *)sender ...
- 在centos阿里云服务器上安装配置php运行环境 安装php7
http://blog.csdn.net/kesixin/article/details/72882469 单独安装php7 http://blog.csdn.net/tang05709/articl ...
- 分析诊断工具之五:Procedure Analyse优化表结构
一.Procedure Analyse PROCEDURE ANALYSE() ,在优化表结构时可以辅助参考分析语句.通过分析select查询结果对现有的表的每一列给出优化的建议. 利用此语句,MyS ...
- 2017-09-17 python 学习笔记
Mock 库 介绍: http://blog.csdn.net/chdhust/article/details/50663729 说明mock能做什么. 可以考虑在调试方法时使用 Mock 库
- 函数指针的应用学习Demo
学习函数指针的应用 ,简单demo #include "stdafx.h" #include "SubClass.h"; //函数指针 typedef int ...