Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of ambs (3914)

Thursday July 02, 2009
04:31 PM

Understanding Perl and Encodings

[ #39215 ]

I still did not get the grip on Encodings and Perl. I have an UTF8 file that I want to process. This process calls a module that I know uses a bidirectional pipe with an latin1 process. But that should be hidden...

So, I am reading with <> operator, and printing with print. If I do not say a thing, I get output correct (UTF8) but the module does not work. If I put 'use encoding utf8', I get input and output correct, but the module does not work. If I put 'use open utf8' I get the module working, but no correct output. If I add the binmode for the STDOUT, it works. And finally, if I remove 'use open' and add a binmode for STDIN, it does not work, as <> is not affected by that.

Finally, I was hopping that 'use open utf8' would work for it all. Unfortunately it doesn't. Perl 5.10.0, btw.

Ideas, suggestions, corrections, are welcome.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.