perl-unicode

IO::Socket::INET and utf-8

2003-07-01 00:30:11
I have a module based on IO::Socket::INET which has a method which should be able to send UTF-8 across the socket. When I call the method with a UTF-8 string it does a:

print $sock $string

where $sock was returned by IO::Socket::INET and $string contains UTF-8 characters. I get a warning:

Wide character in print at ESXMLODBC/XMLREQUEST.pm line 254.

How do I make the default encoding on the socket UTF-8 in the same way as you do with file handles (e.g. open(my $fh,'>:utf8', 'anything') or binmode (FH, ":utf8"))?

I'm using Perl 5.8.0.

Thanks.

Martin

<Prev in Thread] Current Thread [Next in Thread>