【Error】RSS atom.xml 解析错误:Input is not proper UTF-8, indicate encoding !

打开RSS的链接:atom.xml,报错如下:

This page contains the following errors:
error on line 20 at column 16: Input is not proper UTF-8, indicate encoding !
Bytes: 0x15 0x3C 0x2F 0x70
Below is a rendering of the page up to the first error.

搜索之后发现是由于XML的规定中不允许出现一些特殊字符:
 

The following are the character ranges for low-order non-printable ASCII characters that are rejected by MSXML versions 3.0 and later:
#x0 - #x8 (ASCII 0 - 8)
#xB - #xC (ASCII 11 - 12)
#xE - #x1F (ASCII 14 - 31)

解决办法,搜索文档中不合法的特殊字符,用vim打开删掉即可。

grep -n "\x15"

参考:

1. https://blog.csdn.net/ISaiSai/article/details/53899089

2. https://support.microsoft.com/en-us/help/315580/prb-error-message-when-an-xml-document-contains-low-order-ascii-charac

发布了245 篇原创文章 · 获赞 104 · 访问量 69万+

猜你喜欢

转载自blog.csdn.net/think_ycx/article/details/105665838