Skip Menu |

This queue is for tickets about the Net-SSH-Perl CPAN distribution.

Report information
The Basics
Id: 49102
Status: open
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: james.kingston [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: XML, UTF8, and Net::SSH::Perl
Date: Fri, 28 Aug 2009 12:41:57 -0500
To: bug-Net-SSH-Perl [...] rt.cpan.org
From: James Kingston <james.kingston [...] gmail.com>
I have been having this persistent problem when calling $ssh->cmd($s): input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Crypt/DES.pm line 57 My attempts will all succeed until I attempt to parse XML with either XML::Simple or XML::LibXML. After that, no cmd() calls work. I have discovered a workaround, which is to strip the UTF8 attributes from the command string: utf8::downgrade($cmd); my ($out, $err, $exit) = $ssh->cmd($cmd);
Le Ven. Aoû. 28 13:42:26 2009, james.kingston@gmail.com a écrit : Show quoted text
> I have been having this persistent problem when calling $ssh->cmd($s): > input must be 8 bytes long at > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Crypt/DES.pm > line 57 > > My attempts will all succeed until I attempt to parse XML with either > XML::Simple or XML::LibXML. After that, no cmd() calls work.
I'm not the maintainer of this module (not even a user), but your bug report would get more attention if you provide more information: - which version of Net::SSH::Perl you are using - which SSH protocol version you are using (the host you are connecting to) - a simple program that could be used as a test case -- Olivier Mengué - http://o.mengue.free.fr/
From: offbeatadam
I have found this to be true whenever I am using XML::Simple, as XML by definition returns UTF8 characters. Handling of UTF8 is not necessarily required, although it would be nice if UTF8 were automatically detected, for cleanliness and compatibility. Attached is example code and example XML file. The problem is that even when a doctype is set, LibXML returns UTF8, which is expected and intentional. As time goes forward and UTF8 becomes more prominent in the landscape, it would be beneficial to not require a UTF8 downgrade in order to perform SSH tasks in a more automated manner. On Sat Sep 26 09:23:31 2009, DOLMEN wrote: Show quoted text
> Le Ven. Aoû. 28 13:42:26 2009, james.kingston@gmail.com a écrit :
> > I have been having this persistent problem when calling $ssh->cmd($s): > > input must be 8 bytes long at > > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Crypt/DES.pm > > line 57 > > > > My attempts will all succeed until I attempt to parse XML with either > > XML::Simple or XML::LibXML. After that, no cmd() calls work.
> > > I'm not the maintainer of this module (not even a user), but your bug > report would get more attention if you provide more information: > - which version of Net::SSH::Perl you are using > - which SSH protocol version you are using (the host you are
connecting to) Show quoted text
> - a simple program that could be used as a test case
Subject: bug49102.tar.gz
Download bug49102.tar.gz
application/gzip 783b

Message body not shown because it is not plain text.

On Wed Jun 02 18:42:23 2010, https://www.google.com/accounts/o8/id?id=AItOawkOfqGC-nNI5QGcFLg4F4j-Y7W8CJTV1Aw wrote: Show quoted text
> I have found this to be true whenever I am using XML::Simple, as XML by > definition returns UTF8 characters. > > Handling of UTF8 is not necessarily required, although it would be nice > if UTF8 were automatically detected, for cleanliness and compatibility. > > Attached is example code and example XML file.
For the records: I verified that the test with "utf8::downgrade" works. Not sure yet, however, how to tackle this in Net::SSH::Perl. Kind regards, Steffen -- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/>