2017-05-17 12:00:29 +02:00
|
|
|
Index: cpan/libnet/lib/Net/Cmd.pm
|
|
|
|
===================================================================
|
|
|
|
--- cpan/libnet/lib/Net/Cmd.pm.orig
|
|
|
|
+++ cpan/libnet/lib/Net/Cmd.pm
|
2016-05-09 14:03:01 +02:00
|
|
|
@@ -290,6 +290,10 @@ sub command {
|
2009-06-12 16:26:43 +02:00
|
|
|
$str = $cmd->toascii($str) if $tr;
|
|
|
|
$str .= "\015\012";
|
|
|
|
|
|
|
|
+ # encode to individual utf8 bytes if
|
|
|
|
+ # $str is a string (in internal UTF-8)
|
2016-05-09 14:52:12 +02:00
|
|
|
+ utf8::encode($str) if utf8::is_utf8($str);
|
2009-06-12 16:26:43 +02:00
|
|
|
+
|
2016-05-09 14:03:01 +02:00
|
|
|
$cmd->debug_print(1, $str)
|
|
|
|
if ($cmd->debug);
|
2009-06-12 16:26:43 +02:00
|
|
|
|
2016-05-09 14:03:01 +02:00
|
|
|
@@ -525,6 +529,10 @@ sub rawdatasend {
|
2015-06-23 21:23:16 +02:00
|
|
|
return 0
|
|
|
|
if $cmd->_is_closed;
|
2009-06-12 16:26:43 +02:00
|
|
|
|
|
|
|
+ # encode to individual utf8 bytes if
|
|
|
|
+ # $line is a string (in internal UTF-8)
|
2016-05-09 14:52:12 +02:00
|
|
|
+ utf8::encode($line) if utf8::is_utf8($line);
|
2009-06-12 16:26:43 +02:00
|
|
|
+
|
|
|
|
return 1
|
|
|
|
unless length($line);
|
|
|
|
|