This queue is for tickets about the Net-SFTP-Foreign CPAN distribution.

Report information
The Basics
Id:
127070
Status:
new
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
roland.kapl [...] oebfa.at
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: binmode STDOUT change of discipline
Date: Sat, 8 Sep 2018 09:29:24 +0000
To: "bug-Net-SFTP-Foreign@rt.cpan.org" <bug-Net-SFTP-Foreign@rt.cpan.org>
From: Kapl Roland <roland.kapl@oebfa.at>

Dear Salvador!

 

I use changing the output discipline with <binmode STDOUT, ":encoding(CP850)";> at the beginning of my script to get decent output of special characters (german “Umlauts”, like ä,ö,ü etc.).

 

Now, Net::SFTP::Foreign package seems to revert this to raw after calling

 

Net::SFTP::Foreign->new(

                                                host => $param->{RemoteHost},

                                                user => $param->{user},

                                                port => ($param->{port} ? $param->{port} : '22'),

                                                ssh_cmd => $plinkInstallationPath,

                                                more => [ -i => $param->{privKey}, "-v”]

                                    );

 

I can work around this by setting binmode STDOUT, ":encoding(CP850)"; right after this call, however, I think this should be handled by Net::SFTP::Foreign.

 

I suspect this to happen in Net::SFTP::Foreign::Backend::Windows, in

 

sub _init_transport_streams {

    my ($backend, $sftp) = @_;

    binmode $sftp->{ssh_in};

    binmode $sftp->{ssh_out};

}

 

-regards,

Roland



This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.