]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/Irc.pl
more binmode attempts
[infobot.git] / src / IRC / Irc.pl
index 41d3ce292aa2d131d06fc7e1fd48b5eb382b6f99..21a31fe93bd097bdbe24e942bf5c36f39209941d 100644 (file)
@@ -19,9 +19,6 @@ use vars qw($notcount $nottime $notsize $msgcount $msgtime $msgsize
 use vars qw($b_blue $ob);
 use vars qw(@ircServers);
 
-#use open ':utf8';
-#use open ':std';
-
 $nickserv = 0;
 
 # It's probably closer to 510, but let's be cautious until we calculate it extensively.
@@ -128,6 +125,13 @@ sub irc {
                &ERROR('If this is still a problem, please contact the maintainer.');
            }
            if (defined $conns{$mynick}) {
+               # explicit binmode for socket as "use open" does not seem to work here
+               #binmode $conns{$mynick}->{_socket}, ":utf8";
+               #binmode $conns{$mynick}->{_socket}, ":encoding(UTF-8)";
+               # TODO: need to input bytes, but output utf8
+               binmode $conns{$mynick}->{_socket}, ":bytes";
+               binmode $conns{$mynick}->socket, ":bytes";
+
                $conns{$mynick}->maxlinelen($maxlinelen);
 
                # handler stuff.