* FIX: Wide character in print
authormitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Sat, 18 Dec 2010 15:15:35 +0000 (15:15 +0000)
committermitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Sat, 18 Dec 2010 15:15:35 +0000 (15:15 +0000)
  * $status->{user}{name} may contain UTF-8 characters

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@99 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

Dev/twitter/dump_timeline.pl

index 8216287..deba425 100755 (executable)
@@ -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";
             }
         }
     }