xml 浏览器打开报错Input is not proper UTF-8, indicate encoding !
来源:互联网 发布:apache局域网无法访问 编辑:程序博客网 时间:2024/05/21 11:14
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 0xB2Below is a rendering of the page up to the first error.
解决办法:replace 这些字符
xxx.replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u0009|\u000a|\u000b|\u000c|\u000d|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f/g,"")
原因:XML 规范不支持如下字符
#x0 - #x8 (ASCII 0 - 8)#xB - #xC (ASCII 11 - 12)#xE - #x1F (ASCII 14 - 31)
参看文档:https://support.microsoft.com/en-us/kb/315580
0 0
- xml 浏览器打开报错Input is not proper UTF-8, indicate encoding !
- php xml Input is not proper UTF-8, indicate encoding错误
- 遇到BAM报错“input is not proper UTF-8”的一个可能解决方案
- 界面编码报错:Page-encoding specified in XML prolog (UTF-8) is different from that specified in
- appcompat_v7报错,<?xml version="1.0" encoding="utf-8"?>警报
- wsimport报错Use of SOAP Encoding is not supported.
- JNI WARNING: input is not valid Modified UTF-8
- Page-encoding specified in XML prolog (UTF-8) is different ...页面编码错误
- Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive (utf-8)
- Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive (utf-8)
- Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive(utf
- jni 中使用NewStringUTF时报错:input is not valid Modified UTF-8: illegal start byte 0xa0
- python+selenium自动化测试~打开浏览器报TypeError: 'module' object is not callable
- 浏览器报错obj.attachEvent is not a function
- 浏览器报错:ReferenceError: require is not defined
- newStringUTF出现input is not valid Modified UTF-8错误解决办法
- JNI WARNING: input is not valid Modified UTF-8: illegal start byte 0xfe
- input is not valid Modified UTF-8: illegal start byte 0x**
- 如何查看Maven项目中的jar包依赖树情况
- netbeans连接数据库SQLserver2008
- 7.3 Python 模块搜索,加载和编译
- 个人记录-LeetCode 57. Insert Interval
- 解决faster-rcnn中训练时assert(boxes[:,2]>=boxes[:,0]).all()的问题
- xml 浏览器打开报错Input is not proper UTF-8, indicate encoding !
- 20161227:for python网络数据采集01
- 9点的
- Java连接Oracle数据库的三种连接方式
- 深入学习golang(4)—new与make
- 使用RANSAC提纯KAZE和AKAZE特征点,达到鲁棒匹配的效果(OpenCV 3.2.0下,源码)
- 关于傅里叶的总结(一)
- hdu 2516 取石子游戏+Fibonacci’s Game(斐波那契博弈)
- js数组的三种声明方式