summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <lookshe@fumuga.com>2012-03-13 00:10:26 +0100
committerlookshe <lookshe@fumuga.com>2012-03-13 00:10:26 +0100
commit7b7cd25035271f378c02cd615829af1feeeb7981 (patch)
tree0e5d740689ae853d7ee65ded05c38845e216f463
parentca0c3a4b662c72cbfeca8884cdc13ef4d448467c (diff)
add binmode for perl onliners
-rw-r--r--tinyurl.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tinyurl.tcl b/tinyurl.tcl
index e935555..d422126 100644
--- a/tinyurl.tcl
+++ b/tinyurl.tcl
@@ -59,16 +59,16 @@ foreach act_arg $arg {
if {$length >= $url_length} {
#set tinyurl [make_tinyurl $url]
- set tinyurl [exec perl -e "use WWW::Shorten::TinyURL;print makeashorterlink(\"$url\");"]
+ set tinyurl [exec perl -e "use WWW::Shorten::TinyURL;binmode(STDOUT, \":utf8\");print makeashorterlink(\"$url\");"]
if {$tinyurl != "0"} {
- set title [exec perl -e "use URI::Title;print URI::Title::title(\"$url\");"]
+ set title [exec perl -e "use URI::Title;binmode(STDOUT, \":utf8\");print URI::Title::title(\"$url\");"]
putserv "PRIVMSG $chan :\002Tiny URL\002: $tinyurl \[$title\] (URL by \002$nick\002)"
}
}
if {([string match "*youtube*watch*" $url] == 1)} {
- set title [exec perl -e "use URI::Title;print URI::Title::title(\"$url\");"]
+ set title [exec perl -e "use URI::Title;binmode(STDOUT, \":utf8\");print URI::Title::title(\"$url\");"]
if {([string match "* - YouTube" $title] == 1)} {
set title [string range $title 0 end-10]
putserv "PRIVMSG $chan :\002Youtube\002: $title (URL by \002$nick\002)"