diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-11-20 10:07:51 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-11-20 10:07:51 +0800 |
commit | e0e85ccf6aa77f43323bf7a9aef0f74ce001701e (patch) | |
tree | a7f17b7e118429af7c15d20dd25ba5935b44726c | |
parent | 58ca11c55d6b69290e8141ce16f3863b53b144ad (diff) | |
download | pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.tar pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.tar.gz pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.tar.bz2 pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.tar.lz pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.tar.xz pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.tar.zst pttbbs-e0e85ccf6aa77f43323bf7a9aef0f74ce001701e.zip |
s/����\&\#22531\;/���}/g;
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@577 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | util/udnnews.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/util/udnnews.pl b/util/udnnews.pl index 4d37a26a..5e19ae88 100644 --- a/util/udnnews.pl +++ b/util/udnnews.pl @@ -20,11 +20,20 @@ chdir '/home/bbs'; getudnnewstitle(\@titles); foreach( @titles ){ postout({brdname => 'udnnews', - title => FormatChinese($_->[1]), + title => strreplace(FormatChinese($_->[1])), owner => 'udnnews.', content => getudnnewscontent("http://www.udn.com/NEWS/FOCUSNEWS/$_->[0]")}); } +sub strreplace +{ + my($str) = @_; + $str =~ s/¢Ì/¤Q/g; + $str =~ s/¢Î/¤Ê/g; + $str =~ s/´å¿ü\&\#22531\;/´å´}/g; + return $str; +} + sub getudnnewscontent($) { my($url) = @_; @@ -38,8 +47,7 @@ sub getudnnewscontent($) $content =~ s/\r//g; $content =~ s/\n\n\n/\n\n/g; $content =~ s/\n\n\n//g; - $content =~ s/¢Ì/¤Q/g; - $content =~ s/¢Î/¤Ê/g; + $content = strreplace($content); undef $ret; foreach( split(/\n/, $content) ){ s/ //g; |