Front page | perl.perl5.porters |
Postings from September 2011
[perl #98370] Perl doesn't decode IBM037
Thread Next
From:
tomushkin @ gmail . com
Date:
September 4, 2011 14:52
Subject:
[perl #98370] Perl doesn't decode IBM037
Message ID:
rt-3.6.HEAD-31297-1315141520-1133.98370-75-0@perl.org
# New Ticket Created by tomushkin@gmail.com
# Please include the string: [perl #98370]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=98370 >
This is a bug report for perl from tomushkin@gmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.1.
-----------------------------------------------------------------
[Please describe your issue here]
# perl -MEncode -e 'decode("IBM037", "\x{a2}\x{97}\x{81}\x{94}")'
Unknown encoding 'IBM037' at -e line 1
My servers are spammed with IBM037 encoded email, that renders
properly by the most mail clients, but fails to decode by the
perl filters. For some reason, it doesn't alias to cp37, but
cp037. I use the following workaround:
use Encode::Alias;
define_alias(qr/^cp0+(\d+)$/i => ''"cp$1"'');
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=low
module=Encode
---
Site configuration information for perl 5.14.1:
Configured by nobody at Wed Jun 29 17:15:04 UTC 2011.
Summary of my perl5 (revision 5 version 14 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.39-arch, archname=x86_64-linux-thread-multi
uname='linux foutbox 2.6.39-arch #1 smp preempt mon jun 27 21:26:22 cest 2011 x86_64 amd phenom(tm) ii x6 1090t processor authenticamd gnulinux '
config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=x86-64 -mtune=generic -O2 -pipe -Dprefix=/usr -Dinstallprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dcccdlflags='-fPIC' -Dlddlflags=-shared -Wl,--hash-style=gnu -Wl,--as-needed -Dldflags=-Wl,--hash-style=gnu -Wl,--as-needed'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-march=x86-64 -mtune=generic -O2 -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.6.1', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.14.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.14'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE'
cccdlflags='-fPIC', lddlflags='-shared -Wl,--hash-style=gnu -Wl,--as-needed -L/usr/local/lib -fstack-protector'
Locally applied patches:
---
@INC for perl 5.14.1:
/usr/lib/perl5/site_perl
/usr/share/perl5/site_perl
/usr/lib/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib/perl5/core_perl
/usr/share/perl5/core_perl
.
---
Environment for perl 5.14.1:
HOME=/home/toma
LANG=en_US.UTF-8
LANGUAGE (unset)
LC_ALL=en_US.UTF-8
LD_LIBRARY_PATH=
LOGDIR (unset)
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/opt/java/jre/bin:/usr/bin/vendor_perl:/usr/lib/perl5/vendor_perl/bin:/usr/bin/core_perl
PERL5LIB=
PERL_BADLANG (unset)
SHELL=/bin/zsh
Thread Next
-
[perl #98370] Perl doesn't decode IBM037
by tomushkin @ gmail . com