This is somewhat outside standards land, as Telnet was supposed to be ASCII.

Try passing bin_mode => 1 to Net::Telnet->new, and doing the decoding of
@lines yourself with Encode. See Encode::KR for a few common Korean charset
encodings to try.

On Tue, Jul 12, 2011 at 1:50 PM, Ishay <[email protected]> wrote:

> Hi,
>
> I'm trying to use the Net::Telnet module to get some configuration
> from a device, this is my program:
>
>    use Net::Telnet ();
>    $t = new Net::Telnet (Timeout => 10, Prompt => '/[^\r\n]*# $/');
>    $t->open($ip);
>    $t->login($username, $passwd);
>    @lines = $t->cmd("get config");
>    print @lines;
>
>
> The problem is that the device I'm trying to connect to has Korean
> characters, and when I try run this program the output being printed
> isn't like the real config (it prints some gibberish Korean
> characters).
> I'm guessing I need to configure my telnet module to use some sort of
> encoding, but how?
> any idea ?
> Thanks,
> Ishay
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>



-- 
Gaal Yahas <[email protected]>
http://gaal.livejournal.com/
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to