Here you go. FYI, all my testing was done via perlbrew.
nfg@bill-ubuntu-ng:/home/main/SMS on master *$ lsb_release -a
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
nfg@bill-ubuntu-ng:/home/main/SMS on master *$ perl -V
Summary of my perl5 (revision 5 version 20 subversion 3) configuration:
Platform:
osname=linux, osvers=4.2.0-27-generic, archname=x86_64-linux
uname='linux bill-ubuntu-ng 4.2.0-27-generic #32-ubuntu smp fri
jan 22 04:49:08 utc 2016 x86_64 x86_64 x86_64 gnulinux '
config_args='-de -Dprefix=/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='5.2.1 20151010', 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 =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.21.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.21'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
Locally applied patches:
Devel::PatchPerl 1.30
Built under linux
Compiled at Mar 18 2016 13:31:29
%ENV:
PERL5LIB="/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/lib/perl5/x86_64-linux:/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/lib/perl5"
PERLBREW_BASHRC_VERSION="0.43"
PERLBREW_HOME="/home/ad/nigelg/.perlbrew"
PERLBREW_LIB="dev"
PERLBREW_MANPATH="/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/man:/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3/man"
PERLBREW_PATH="/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/bin:/home/ad/nigelg/perl5/perlbrew/bin:/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3/bin"
PERLBREW_PERL="perl-5.20.3"
PERLBREW_ROOT="/home/ad/nigelg/perl5/perlbrew"
PERLBREW_VERSION="0.43"
PERL_LOCAL_LIB_ROOT="/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev"
PERL_MB_OPT="--install_base /home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev"
PERL_MM_OPT="INSTALL_BASE=/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev"
@INC:
/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/lib/perl5/x86_64-linux
/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/lib/perl5/x86_64-linux
/home/ad/nigelg/.perlbrew/libs/perl-5.20.3@dev/lib/perl5
/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/x86_64-linux
/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3
/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/x86_64-linux
/home/ad/nigelg/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3
.
On 22 March 2016 at 01:39, Dan Kogai via RT <bug-Encode@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=113164 >
>
> I could not reproduce your symptom on OS X v10.11.4, Ubuntu 14.04 LTS, and FreeBSD 10.2-RELEASE. Would you tell me more about your environment in details?
> the output of "perl -V" is pretty helpful.
>
> Dan the Maintainer Thereof
>
> On Fri Mar 18 21:14:16 2016, nigelgregoire@gmail.com wrote:
>> Hello! On my system encode() sometimes returns an Encode::XS object
>> instead of the resulting string. Here's some sample code:
>>
>> nfg@bill-ubuntu-ng:/home/main/SMS on master *$ cat encode2.pl
>> #!/usr/bin/env perl
>> use strict;
>> use warnings;
>>
>> use Encode;
>> use Data::Dumper;
>>
>> my $str = "You" . chr(8217) . "re doomed!";
>> binmode STDOUT, ":encoding(utf8)";
>> binmode STDERR, ":encoding(utf8)";
>> print $str, "\n";
>>
>> my $data;
>>
>> my $cb = sub {
>> $data = [ ('?') x 12_500 ];
>> return ";";
>> };
>>
>> my $octets = encode('iso-8859-1', $str, $cb);
>> print Dumper($octets), "\n";
>>
>> print "And again: ", "\n";
>> $octets = encode('iso-8859-1', $str, $cb);
>> print Dumper($octets), "\n";
>>
>> OUTPUT:
>>
>> nfg@bill-ubuntu-ng:/home/main/SMS on master *$ perl encode2.pl
>> You’re doomed!
>> $VAR1 = bless( do{\(my $o = '140472427705184')}, 'Encode::XS' );
>>
>> And again:
>> $VAR1 = 'You;re doomed!';
>>
>> Segmentation fault (core dumped)
>>
>>
>>
>> I ran into this with some code that uses Text::Unidecode in the CHECK
>> callback. Text::Unidecode can dynamically require packages while
>> running.
>>
>> This is with Encode 2.82. I've reproduced it on Perl 5.8.9, 5.14.2,
>> 5.16.0, 5.20.3, and 5.22.1 , as long as I allocate enough memory.
>> FWIW,
>>
>> Cheers!
>>
>
>
>
--
Nigel
http://www.forgreatjustice.ca/