打開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"
參考: