diff options
author | garga <garga@FreeBSD.org> | 2009-12-14 23:44:07 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2009-12-14 23:44:07 +0800 |
commit | eaaff2e5d402b1312f6cfd8a9f9ad19ff02b67b9 (patch) | |
tree | e5c82e63131c2c3fe21fb4e1f9e96f5b05f201b0 /net-im/twirssi | |
parent | c70567897123ab9751ce546d54ebcffa3f353fd9 (diff) | |
download | freebsd-ports-gnome-eaaff2e5d402b1312f6cfd8a9f9ad19ff02b67b9.tar.gz freebsd-ports-gnome-eaaff2e5d402b1312f6cfd8a9f9ad19ff02b67b9.tar.zst freebsd-ports-gnome-eaaff2e5d402b1312f6cfd8a9f9ad19ff02b67b9.zip |
Forgot patch on last commit
Diffstat (limited to 'net-im/twirssi')
-rw-r--r-- | net-im/twirssi/files/patch-twirssi.pl | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/net-im/twirssi/files/patch-twirssi.pl b/net-im/twirssi/files/patch-twirssi.pl new file mode 100644 index 000000000000..583fc158c7a3 --- /dev/null +++ b/net-im/twirssi/files/patch-twirssi.pl @@ -0,0 +1,60 @@ +--- twirssi.pl 2009-11-09 08:40:49.000000000 -0200 ++++ twirssi.pl 2009-11-06 18:03:05.000000000 -0200 +@@ -851,7 +851,7 @@ + return unless &logged_in($twit); + + my ( $fh, $filename ) = File::Temp::tempfile(); +- binmode( $fh, ":utf8" ); ++ binmode( $fh, ":" . &get_charset ); + $child_pid = fork(); + + if ($child_pid) { # parent +@@ -1213,7 +1213,7 @@ + # pretend + + if ( open FILE, $filename ) { +- binmode FILE, ":utf8"; ++ binmode FILE, ":" . &get_charset; + my @lines; + my %new_cache; + while (<FILE>) { +@@ -1596,6 +1596,13 @@ + return 60; + } + ++sub get_charset { ++ my $charset = Irssi::settings_get_str("twirssi_charset"); ++ print scalar localtime, " - charset: '$charset'" if &debug; ++ return "utf8" if $charset =~ /^\s*$/; ++ return $charset; ++} ++ + sub hilight { + my $text = shift; + +@@ -1636,7 +1643,7 @@ + "Set short_url_args to username,API_key or change your", + "short_url_provider." + ); +- return decode "utf8", $data; ++ return decode &get_charset, $data; + } + } + +@@ -1653,7 +1660,7 @@ + } + } + +- return decode "utf8", $data; ++ return decode &get_charset, $data; + } + + sub normalize_username { +@@ -1695,6 +1702,7 @@ + ); + + Irssi::settings_add_int( "twirssi", "twitter_poll_interval", 300 ); ++Irssi::settings_add_str( "twirssi", "twirssi_charset", "utf8" ); + Irssi::settings_add_str( "twirssi", "twitter_window", "twitter" ); + Irssi::settings_add_str( "twirssi", "bitlbee_server", "bitlbee" ); + Irssi::settings_add_str( "twirssi", "short_url_provider", "TinyURL" ); |