Skip to content

Instantly share code, notes, and snippets.

@semifor
Created September 10, 2009 16:47
Show Gist options
  • Save semifor/184648 to your computer and use it in GitHub Desktop.
Save semifor/184648 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
# unicode test
use strict;
use warnings;
use feature ':5.10';
use Carp qw/confess/;
use Encode qw/decode_utf8/;
use Net::Twitter;
my $nt = Net::Twitter->new(legacy => 0, netrc => 1);
my $hex = '313233c3b6343536373839';
my $decoded = decode_utf8 pack('H*', $hex);
my @v = (
$],
Net::Twitter->VERSION,
JSON::Any->handlerType,
JSON::Any->handlerType->VERSION,
);
eval {
$nt->update(qq/@v: $hex => $decoded/);
print "success\n";
};
confess $@ if $@;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment