Subject: | Sending UTF-8 updates |
Updates sent from a UTF-8 environment produce wrong-charset artifacts. A
script is attached that reproduces the problem. I've found a workaround,
but I don't know how it affects the system in other scenarios:
removing/commenting out line 71 in Net/Twitter/API.pm (utf8::upgrade $_
for values %$args;) fixes it for me.
perl -v: This is perl, v5.10.0 built for i686-linux-thread-multi
uname -a: Linux keyrit 2.6.30-ARCH #1 SMP PREEMPT Fri Jul 3 02:32:03 PDT
2009 i686 Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz GenuineIntel
GNU/Linux
echo $LANG: en_US.utf8
Subject: | twitter-utf.pl |
use Net::Twitter;
my $nt = Net::Twitter->new(
traits => [qw/API::REST/],
username => 'user',
password => 'pass'
);
my $result = $nt->update('árvÃztűrÅ tükörfúrógép');
eval {
my $statuses = $nt->friends_timeline({ since_id => $high_water, count => 100 });
for my $status ( @$statuses ) {
print "$status->{time} <$status->{user}{screen_name}> $status->{text}\n";
}
};
if ( my $err = $@ ) {
die $@ unless blessed $err && $err->isa('Net::Twitter::Error');
warn "HTTP Response Code: ", $err->code, "\n",
"HTTP Message......: ", $err->message, "\n",
"Twitter error.....: ", $err->error, "\n";
}