perl/perl-netcmdutf8.diff
Stephan Kulow 7c0e218d87 Accepting request 313011 from home:hsk17:branches:devel:languages:perl
update to 5.22.0

regarding the .spec file:  i have updated the "(Provides|Obsoletes): perl-*" directives to reflect the module versions provided by perl-5.22.0.  but only for the modules that already were mentioned in the .spec file.  i cannot judge why these are in the .spec file  while many others are not.

OBS-URL: https://build.opensuse.org/request/show/313011
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=130
2015-06-23 19:23:16 +00:00

25 lines
668 B
Diff

--- ./cpan/libnet/lib/Net/Cmd.pm.orig 2009-09-03 14:32:13.000000000 +0000
+++ ./cpan/libnet/lib/Net/Cmd.pm 2009-09-03 14:47:30.000000000 +0000
@@ -254,6 +254,10 @@ sub command {
$str = $cmd->toascii($str) if $tr;
$str .= "\015\012";
+ # encode to individual utf8 bytes if
+ # $str is a string (in internal UTF-8)
+ utf8::encode($str) if is_utf8($str);
+
my $len = length $str;
my $swlen;
@@ -509,6 +512,10 @@ sub rawdatasend {
return 0
if $cmd->_is_closed;
+ # encode to individual utf8 bytes if
+ # $line is a string (in internal UTF-8)
+ utf8::encode($line) if is_utf8($line);
+
return 1
unless length($line);