From: mitty Date: Sat, 18 Dec 2010 15:15:35 +0000 (+0000) Subject: * FIX: Wide character in print X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;ds=sidebyside;h=294a3aa0a1afb56d06c211c969bca66aabcc360b;p=lab.git * FIX: Wide character in print * $status->{user}{name} may contain UTF-8 characters git-svn-id: https://lab.mitty.jp/svn/lab/trunk@99 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- diff --git a/Dev/twitter/dump_timeline.pl b/Dev/twitter/dump_timeline.pl index 8216287..deba425 100755 --- a/Dev/twitter/dump_timeline.pl +++ b/Dev/twitter/dump_timeline.pl @@ -87,9 +87,9 @@ eval { $text .= $status->{user}{name}; $text .= " [" . $status->{created_at} . "]"; $text .= " (". $status->{id} . ")"; - $text .= " ". encode('utf8', $status->{text}); + $text .= " ". $status->{text}; $text =~ s/\n//; - print $text, "\n"; + print encode('utf8', $text), "\n"; } } }