Hi Ishai,

Try to first "open" the input stream and associate it with a file handle in
the three arguments format, with the middle argument specifying the
"encoding":
        open my $fh, "<:encoding(your-encoding-choice)", xxx 
        # Assuming the last argument makes sense as a process name or pipe
And then use "fhopen" rather then "open" 
        $ok = $obj->fhopen($fh);
This is supposed to take whatever encoding you incoming text stream is using
and turn it into Perl's internal UNICODE representation. Then you can use
all the UNICODE text processing features Perl provides to process it.

Important!!! I didn't test this. I don't have a TelNet device and I never
used Net::Telnet. Also, I am not sure that your input stream can be assigned
to a file-handle. But this way I solved reading actual files encoded in one
of the (many) Hebrew encodings.

I am sending to your private address a copy of a talk I gave a little while
ago at the Tel-Aviv Perl Mongers meeting. (Any body wishing to also get a
copy, please write me.)

Good luck!
Meir

_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to