Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

The locale codeset (cp1252) isn't one that perl can decode

by jellisii2 (Hermit)
on Aug 15, 2011 at 18:57 UTC ( [id://920335]=perlquestion: print w/replies, xml ) Need Help??

jellisii2 has asked for the wisdom of the Perl Monks concerning the following question:

I'm getting the above error, but ONLY when I pipe the following script through pp.
require Encode; require Encode::Locale; print "no";
I'm executing pp with the following:
pp test_locale.pl
perl -v returns
This is perl 5, version 12, subversion 4 (v5.12.4) built for MSWin32-x +86-multi-t hread (with 9 registered patches, see perl -V for more detail) Copyright 1987-2010, Larry Wall Binary build 1205 [294981] provided by ActiveState http://www.ActiveSt +ate.com Built Jun 20 2011 18:35:25 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
Anyone with some insight that I'm missing?

Replies are listed 'Best First'.
Re: The locale codeset (cp1252) isn't one that perl can decode
by ikegami (Patriarch) on Aug 15, 2011 at 20:19 UTC
    Encode's helpers are not being packaged by pp. You might get better results using use instead of require (depending on how pp works). Otherwise, you'll have to tell pp to include them explicitly. (Encode::Alias? Encode::Byte? Encode::Config?)
Re: The locale codeset (cp1252) isn't one that perl can decode
by Anonymous Monk on Aug 15, 2011 at 21:05 UTC
    pp -x ...
      This resolved the problem. I was able to take apart the two resulting outputs and discovered that Encode::Byte was missing. Adding this as a module to my pp call fixed the issue.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://920335]
Approved by toolic
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found