yes, your input stream was encoded as GB2312.<br><br><div><span class="gmail_quote">在07-4-15,<b class="gmail_sendername">zongzi</b> &lt;<a href="mailto:honghunter@gmail.com">honghunter@gmail.com</a>&gt; 写道:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
就是说需要强制作一次转码才行?<br><br>在 07-4-13,Dongxu Ma&lt;<a href="mailto:dongxu.ma@gmail.com">dongxu.ma@gmail.com</a>&gt; 写道:<br>&gt; `iconv -f GB2312 -t UTF8 p0.html&#39; showed me Chinese inside that html,<br>&gt; which means while reading from html in your script, you need to decode
<br>&gt; from GB2312. By something like:<br>&gt;<br>&gt; 1. Encode::decode(&quot;GB2312&quot;, &lt;INPUT&gt;)<br>&gt; 2. bindmode INPUT, &quot;:encoding(&#39;GB2312&#39;)&quot;<br>&gt;<br>&gt; 在07-4-13,zongzi &lt;<a href="mailto:honghunter@gmail.com">
honghunter@gmail.com</a>&gt; 写道:<br>&gt; &gt; 编辑器我用的UltraEdit32。<br>&gt; &gt;<br>&gt; &gt; 网页编码都是&lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html;<br>&gt; &gt; charset=gb2312&quot;/&gt;,还需要什么转换吗?<br>&gt; &gt;
<br>&gt; &gt;<br>&gt; &gt; 在 07-4-13,Beckheng Lam&lt;<a href="mailto:beckheng@perlchina.org">beckheng@perlchina.org</a>&gt; 写道:<br>&gt; &gt; &gt; 是不是跟gbk或者utf8有关?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; 缘起和合 wrote:<br>&gt; &gt; &gt; 什么编辑器干的?确实很乱,用VIM吧
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; On 4/12/07, zongzi &lt;<a href="mailto:honghunter@gmail.com">honghunter@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; 为了方便放在PDA上面看小说,我用wget把网页(是新浪读书频道)下载到本机,然后用perl去把其中的正文提取出来。
<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; 发现弄出来的txt文档中,有好多乱码(用记事本打开看的时候)。<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; 请教大家怎么才能解决?<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; 附件是我的代码,写的非常乱。真是不好意思了。
<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; --<br>&gt; &gt; &gt; &gt; 这是一个有钱人的世界,与我的世界截然不同!<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; &gt; China-pm mailing list
<br>&gt; &gt; &gt; &gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>&gt; &gt; &gt; &gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm">http://mail.pm.org/mailman/listinfo/china-pm</a><br>&gt; &gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; --<br>&gt; &gt; &gt; ------======Nerazzurri======------<br>&gt; &gt; &gt; ________________________________<br>&gt; &gt; &gt;<br>
&gt; &gt; _______________________________________________<br>&gt; &gt; China-pm<br>&gt; &gt; &gt; mailing<br>&gt; &gt; &gt; list<br>&gt; &gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>&gt; &gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm">
http://mail.pm.org/mailman/listinfo/china-pm</a><br>&gt; &gt; &gt;<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; China-pm mailing list<br>&gt; &gt; &gt; <a href="mailto:China-pm@pm.org">
China-pm@pm.org</a><br>&gt; &gt; &gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm">http://mail.pm.org/mailman/listinfo/china-pm</a><br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; 这是一个有钱人的世界,与我的世界截然不同!
<br>&gt; &gt; _______________________________________________<br>&gt; &gt; China-pm mailing list<br>&gt; &gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>&gt; &gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm">
http://mail.pm.org/mailman/listinfo/china-pm</a><br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; cheers,<br>&gt; -dongxu<br>&gt; __END__<br>&gt; <a href="http://search.cpan.org/~dongxu">http://search.cpan.org/~dongxu</a><br>&gt; _______________________________________________
<br>&gt; China-pm mailing list<br>&gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>&gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm">http://mail.pm.org/mailman/listinfo/china-pm</a><br>&gt;<br><br><br>
--<br>这是一个有钱人的世界,与我的世界截然不同!<br>_______________________________________________<br>China-pm mailing list<br><a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/china-pm">http://mail.pm.org/mailman/listinfo/china-pm
</a></blockquote></div><br><br clear="all"><br>-- <br>cheers,<br>-dongxu<br>__END__<br><a href="http://search.cpan.org/~dongxu">http://search.cpan.org/~dongxu</a>