Subject: | The locale codeset (cp437) isn't one that perl can decode |
Thanks in advance for your time, details are below :)
$ perl -MLWP::UserAgent -e " LWP::UserAgent->new->env_proxy "
The locale codeset (cp437) isn't one that perl can decode, stopped
at C:/perl/site/5.14.1/lib/Encode/Locale.pm line 87.
Compilation failed in require at
C:/perl/site/5.14.1/lib/LWP/UserAgent.pm line 976.
installing Win32::API and Win32::Console the message changes to
$ perl -MLWP::UserAgent -e " LWP::UserAgent->new->env_proxy "
The locale codeset (cp1252) isn't one that perl can decode, stopped
at C:/perl/site/5.14.1/lib/Encode/Locale.pm line 87.
Compilation failed in require at
C:/perl/site/5.14.1/lib/LWP/UserAgent.pm line 976.
but if you load Encode::Locale first, it works fine
$ perl -MEncode::Locale -MLWP::UserAgent -e "
LWP::UserAgent->new->env_proxy "
both cp437 and cp1252 encodings are available
$ perl -MEncode -le " print Encode::find_encoding(shift) " notExist
$ perl -MEncode -le " print Encode::find_encoding(shift) " cp437
Encode::XS=SCALAR(0xa4022c)
$ perl -MEncode -le " print Encode::find_encoding(shift) " cp1252
Encode::XS=SCALAR(0xa3febc)
before installing the latest versions of Win32::API/Win32::Console
$ perl -d:Modlist -MEncode::Locale -MLWP::UserAgent -e "
LWP::UserAgent->new->env_proxy "
Carp 1.20
Config
Encode 2.43
Encode::Alias 2.14
Encode::Byte 2.04
Encode::Config 2.05
Encode::Encoding 2.05
Encode::Locale 1.02
Exporter 5.64_03
Exporter::Heavy 5.64_03
Fcntl 1.11
HTTP::Config 6.00
HTTP::Date 6.00
HTTP::Headers 6.00
HTTP::Message 6.02
HTTP::Request 6.00
HTTP::Response 6.01
HTTP::Status 6.00
LWP 6.02
LWP::MemberMixin
LWP::Protocol 6.00
LWP::UserAgent 6.02
Storable 2.30
Time::Local 1.2000
URI 1.58
URI::Escape 3.30
XSLoader 0.15
base 2.16
bytes 1.04
constant 1.21
overload 1.13
vars 1.02
warnings 1.12
warnings::register 1.02
The way I stumbled upon this is by compling perl with these LINK_FLAGS
-static-libgcc -static-libstdc++
$ perl -V
Summary of my perl5 (revision 5 version 14 subversion 1) configuration:
Commit id: cc92ef02098c000d945bcf93c92bdb2a0a05fa97
Platform:
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing
-mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.5.2', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-static-libgcc -static-libstdc++ -s
-L"c:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE" -L"C:\MinGW\lib"'
libpth=C:\MinGW\lib
libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=, so=dll, useshrplib=true, libperl=libperl514.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -static-libgcc -static-libstdc++
-s -L"c:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE" -L"C:\MinGW\lib"'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Jul 22 2011 00:38:35
@INC:
C:/perl/site/5.14.1/lib/MSWin32-x86-multi-thread
C:/perl/site/5.14.1/lib
C:/perl/5.14.1/lib/MSWin32-x86-multi-thread
C:/perl/5.14.1/lib
.