Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Encode: unable to change encoding of strings

by ioannis (Priest)
on Jul 09, 2006 at 02:20 UTC ( #559967=note: print w/ replies, xml ) Need Help??


in reply to Encode: unable to change encoding of strings

This liner should work. But since I seat on a console terminal, I prefer avoiding changing fonts and consolechars to visually verify.

The -COE sets for utf8 output, and binmode sets the STDIN for latin1.

perl -COE -npe 'BEGIN{binmode q(:encoding(latin1))} ' < file


Comment on Re: Encode: unable to change encoding of strings
Re^2: Encode: unable to change encoding of strings
by Hue-Bond (Priest) on Jul 09, 2006 at 02:45 UTC
    The -COE sets for utf8 output

    Nice to know :^).

    However, I'm not getting data from a filehandle, but from an XML::Simple object. It's been my mistake not reflecting it clearly at the first attempt. I've updated the OP in the hope that it's better stated now.

    --
    David Serrano

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://559967]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-07-10 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (215 votes), past polls