<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Perl with UTF-8 mode</title>
	<atom:link href="http://www.jeffhung.net/blog/articles/jeffhung/417/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffhung.net/blog/articles/jeffhung/417/</link>
	<description>(My smile insists of having nose. :-)</description>
	<pubDate>Wed, 20 Aug 2008 18:07:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1-alpha</generator>
		<item>
		<title>By: maniac</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-44492</link>
		<dc:creator>maniac</dc:creator>
		<pubDate>Mon, 19 Mar 2007 03:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-44492</guid>
		<description>也可以用 use encoding 叫 perl 把之後的編碼全視做 big5...

$ cat test.pl
#!/usr/bin/perl -w
# Source encoded in big5.
use encoding big5;
my $s = '英雄人物';
if ($s =~ m/英/o) {
    print "是我\n";
}
else {
    print "不是我\n";
}

$ perl test.pl
是我</description>
		<content:encoded><![CDATA[<p>也可以用 use encoding 叫 perl 把之後的編碼全視做 big5...</p>
<p>$ cat test.pl<br />
#!/usr/bin/perl -w<br />
# Source encoded in big5.<br />
use encoding big5;<br />
my $s = '英雄人物';<br />
if ($s =~ m/英/o) {<br />
    print "是我\n";<br />
}<br />
else {<br />
    print "不是我\n";<br />
}</p>
<p>$ perl test.pl<br />
是我</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 莉洛</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-1002</link>
		<dc:creator>莉洛</dc:creator>
		<pubDate>Sun, 12 Feb 2006 08:48:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-1002</guid>
		<description>#!/usr/bin/perl -w
# Source encoded in big5.
my $s = '英雄人物';
if ($s =~ m/\Q英\E/o) {
    print "是我n";
}
else {
    print "不是我n";
}</description>
		<content:encoded><![CDATA[<p>#!/usr/bin/perl -w<br />
# Source encoded in big5.<br />
my $s = '英雄人物';<br />
if ($s =~ m/\Q英\E/o) {<br />
    print "是我n";<br />
}<br />
else {<br />
    print "不是我n";<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeffhung</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-925</link>
		<dc:creator>jeffhung</dc:creator>
		<pubDate>Tue, 17 Jan 2006 09:19:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-925</guid>
		<description>William,

十分感謝，確實是個好方法，且少掉了多次 big5 &#60;=&#62; utf8 轉碼，程式應該會更有效率些。</description>
		<content:encoded><![CDATA[<p>William,</p>
<p>十分感謝，確實是個好方法，且少掉了多次 big5 &lt;=&gt; utf8 轉碼，程式應該會更有效率些。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: william</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-924</link>
		<dc:creator>william</dc:creator>
		<pubDate>Tue, 17 Jan 2006 08:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-924</guid>
		<description>換到 utf8 雖然是個不錯的主意，不過即使留在 big5 陣營，第一段程式仍然有解。只要善用 Perl 的 quotemeta()，就不必自己弄一堆醜醜的十六進位碼：
&#60;span class=&#34;code&#34;&#62;
&#60;pre&#62;#!/usr/bin/perl -w
# Source encoded in big5.
my $s = '英雄人物';
my $regex = quotemeta('英');
if ($s =~ m/$regex/o) {
    print &#34;是我\n&#34;;
}
else {
    print &#34;不是我\n&#34;;
}
&#60;/pre&#62;
&#60;/span&#62;</description>
		<content:encoded><![CDATA[<p>換到 utf8 雖然是個不錯的主意，不過即使留在 big5 陣營，第一段程式仍然有解。只要善用 Perl 的 quotemeta()，就不必自己弄一堆醜醜的十六進位碼：<br />
&lt;span class=&quot;code&quot;&gt;<br />
&lt;pre&gt;#!/usr/bin/perl -w<br />
# Source encoded in big5.<br />
my $s = '英雄人物';<br />
my $regex = quotemeta('英');<br />
if ($s =~ m/$regex/o) {<br />
    print &quot;是我\n&quot;;<br />
}<br />
else {<br />
    print &quot;不是我\n&quot;;<br />
}<br />
&lt;/pre&gt;<br />
&lt;/span&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PipperL</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-898</link>
		<dc:creator>PipperL</dc:creator>
		<pubDate>Tue, 10 Jan 2006 16:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-898</guid>
		<description>說明得實在太詳細了，大感謝! :D</description>
		<content:encoded><![CDATA[<p>說明得實在太詳細了，大感謝! :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 阿司卡程思筆記</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-41150</link>
		<dc:creator>阿司卡程思筆記</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-41150</guid>
		<description>   Perl with UTF-8 mode [JeffHung.Blog] </description>
		<content:encoded><![CDATA[<p>Perl with UTF-8 mode [JeffHung.Blog]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Perl笔记</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/417/#comment-33891</link>
		<dc:creator>Perl笔记</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.idv.tw/blog/?p=417#comment-33891</guid>
		<description>   Perl with UTF-8 mode   Parsing a Querystring With Perl - A Simple ISINDEX Query (Page 2 of 3 )   What’s in a User-Agent String?  </description>
		<content:encoded><![CDATA[<p> Perl with UTF-8 mode   Parsing a Querystring With Perl - A Simple ISINDEX Query (Page 2 of 3 )   What’s in a User-Agent String?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
