Permalink
Browse files

explicitly set encoding on sockets

  • Loading branch information...
1 parent 88a9d69 commit d0dc2d33d0a5eabc1a781b52c253d1f1d85d0a61 @moritz moritz committed Jun 27, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/IO/Socket/INET.pm
View
2 src/core/IO/Socket/INET.pm
@@ -16,6 +16,7 @@ my class IO::Socket::INET does IO::Socket {
constant PROTO_UDP = 17;
}
+ has Str $.encoding = 'utf8';
has Str $.host;
has Int $.port = 80;
has Str $.localhost;
@@ -76,6 +77,7 @@ my class IO::Socket::INET does IO::Socket {
$PIO.bind($addr);
}
+ $PIO.encoding(nqp::unbox_s(PARROT_ENCODING(self.encoding)));
if $.listen {
$PIO.listen($.listen);
}

0 comments on commit d0dc2d3

Please sign in to comment.