in reply to Unicode character handling with Net::Telnet::Cisco

\\ => "\\" \r => "\r" \n => "\n" \u0000 => chr(hex("0000"))

Replies are listed 'Best First'.
Re^2: Unicode character handling with Net::Telnet::Cisco
by josh803316 (Beadle) on Jul 22, 2010 at 18:28 UTC
    I'm sorry to be obtuse but how do I use that..........as a configuration option or do you mean as a way to convert the returned text?
      I provided the code that produces the appropriate character for each sequence. Execute the corresponding code each time you come across one of the sequences, replacing the sequence with the result of the code.
        I used the Encode module and did the following:
        $cleaned_output = decode_utf8( $command_output ); $cleaned_output =~ s/\0//g;
        This removed all the null unicode characters and left me with /r/r/n for the empty return string. I gained some insight from the following article: Unicode-processing issues in Perl