http://www.perlmonks.org?node_id=981090

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

hi there,

I like to use executables. And all of my scripts compile and run fine on the other machine without Perl.

I do have a problem with one script at runtime level only with the executable, not the perl script(.pl). I saw the error in other posts/nodes revering to compilation level.

I compile without any problems like this: pp -o process_statuses.exe -x -c -vvv process_statuses.pl

When I disable the code which is using LWP::UserAgent than I don't have problems at runtime. I didn't see any warnings/errors at compilation in +/- 3000 lines of output.

Does any one have a clue how to handle this?
  • Comment on The locale codeset (cp1252) isn't one that perl can decode, stopped at Encode/Locale.pm line 94.
  • Download Code

Replies are listed 'Best First'.
Re: The locale codeset (cp1252) isn't one that perl can decode, stopped at Encode/Locale.pm line 94.
by Corion (Patriarch) on Jul 11, 2012 at 11:57 UTC

    That error message is raised by the following code:

    unless (Encode::find_encoding($ENCODING_LOCALE)) { my $foundit; if (lc($ENCODING_LOCALE) eq "gb18030") { eval { require Encode::HanExtra; }; if ($@) { die "Need Encode::HanExtra to be installed to support locale c +odeset ($ENCODING_LOCALE), stopped"; } $foundit++ if Encode::find_encoding($ENCODING_LOCALE); } die "The locale codeset ($ENCODING_LOCALE) isn't one that perl can + decode, stopped" unless $foundit; }

    Most likely, Encode cannot decode "cp1252". Did you package Encode::Byte with your program?

      With package do you mean add: use Encode::Byte

      to my code? If this is your question is than the answer is no.

      I will give that at try and wait +/- 20min for compilation

        Basically yes. Putting a use line like you mention is one of the ways to indicate to PAR::Packer to include another file. There also are other ways, as the documentation shows.

Re: The locale codeset (cp1252) isn't one that perl can decode, stopped at Encode/Locale.pm line 94.
by Anonymous Monk on Jul 11, 2012 at 17:12 UTC