<div>Hi, all<br>&nbsp;&nbsp; There are more informations about my parsing error when I use target parser to parse <font color="#800080">http://www.jiayuan.com/</font> . The fatal error reported out is: <font color="#800080">Input is not proper UTF-8, indicate encoding !</font> To find the real place where this problem occured, I have tried to convert the HTML string encoding with <font color="#800080">iconv </font>directly. This time it also report error, and the error character index in string is just the same with my lxml test. Now things are clear that this parsing error is caused by encoding conversion of<font color="#800080"> iconv</font> from utf-8 to utf-8 when there are illegal characters in the source. When I do not define the <font color="#800080">data</font> function in my target parser, It will paser without error report. Is it means that when I escape the <font color="#800080">data</font> function , the UTF-8 to UTF-8 conversion is&nbsp; also escaped ? Or some correct conversion has been done before the call to the <font color="#800080">data</font> function ?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yours<br>&nbsp;&nbsp;&nbsp;&nbsp; <br><br></div><br><!-- footer --><br><span title="neteasefooter"/><hr/>
<a href="http://qiye.163.com/?ft=3">网易企业邮,商务邮箱专家</a>
</span>