Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Encode: unable to change encoding of strings

by ioannis (Monsignor)
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

Replies are listed 'Best First'.
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?
[choroba]: three
[choroba]: I mean I haven't used DBIx::Class nor M:S, only Moo
[1nickt]: Haha, I was learning about Linux filesystem trees trying to understand how Moo fits.
[1nickt]: I just got my feet wet with some DBIC coding this last week. I feel "meh" about it so far. It was pretty easy to add a sub to the DBIC class to filter search results ...
[1nickt]: ... in the calling code ... $rs = $rs->maturity(" stable");. But I don;t enjoy feeling that far away from the SQL and the DB, really.
[1nickt]: The same project (CPAN Testers API) is using experimental signatures (and therefore 5.024) ... which is what replaced Method::Signatures , afaict.
[1nickt]: But the new $job is on an older Perl and therefore using M::S, the syntax of which looks clunky to me, so far.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2017-11-24 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (349 votes). Check out past polls.

    Notices?