# New Ticket Created by dgeorge@no-spam
# Please include the string: [perl #34171]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34171 >
This is a bug report for perl from dgeorge@no-spam
generated with the help of perlbug 1.35 running under perl v5.8.4.
-----------------------------------------------------------------
[Please enter your report here]
Please try the following perl script:
#!/usr/local/perl5/bin/perl -w
use strict;
use bytes;
use XML::DOM;
# XML document
my $xml = "<doc>\xe2\x80\x98WOW\xe2\x80\x99</doc>";
# XML parser
my $parser = new XML::DOM::Parser;
# Document Object Model
my $dom = $parser->parse($xml, ProtocolEncoding => 'UTF-8');
# Element content
my $content = $dom->getDocumentElement()->getFirstChild()->getNodeValue();
# Print length of $content(should be 9 and is 9)
print 'Length of $content = ', unpack("H*", $content), ' is ', length($content), "\n";
# Print length of $1(should be 3 1 1 1 3 and is 1 1 1 1 3)
$content =~ s/([\x00-\x7f]|[\xc0-\xdf].|[\xe0-\xef]..|[\xf0-\xf7]...|[\xf8-\xfb]....|[\xfc-\xfd].....)/print 'Length of $1 = ', unpack("H*", $1), ' is ', length($1), "\n"/eg;
exit;
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.4:
Configured by cwu21 at Thu Apr 22 16:01:31 EDT 2004.
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos cwu21awu 5.8 generic_108528-29 sun4u sparc sunw,sun-blade-100 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='/opt/SUNWspro/bin/cc', ccflags =' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags=''
ccversion='Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='/opt/SUNWspro/bin/cc', ldflags =' -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6U2/lib -L/usr/local/lib '
libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/WS6U2/lib /usr/local/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6U2/lib -L/usr/local/lib'
Locally applied patches:
---
@no-spam for perl v5.8.4:
/home/dlg24/lib/perl
/vol/stnfb/lib/perl
/vol/sec/lib/perl
/usr/local/perl5/lib/5.8.4/sun4-solaris
/usr/local/perl5/lib/5.8.4
/usr/local/perl5/lib/site_perl/5.8.4/sun4-solaris
/usr/local/perl5/lib/site_perl/5.8.4
/usr/local/perl5/lib/site_perl
.
---
Environment for perl v5.8.4:
HOME=/home/dlg24
LANG=C
LANGUAGE (unset)
LD_LIBRARY_PATH=/vol/stnfb/lib/sun5:/cas/lib/sun4:/usr/openwin/lib:/usr/lib:/usr/dt/lib
LOGDIR (unset)
PATH=/bin::/home/dlg24/bin/sun5:/home/dlg24/bin:/vol/stnfb/bin/sun5:/vol/sec/bin/sun5:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/opt/SUNWsmtv/bin:/cas/bin/sun4:/cas/abin/sun4:/cas/X11/sun4/bin:/usr/ccs/bin:/lprod/bin:/usr/sbin:/usr/ucb:/cas/tools/bin/sun4:/cas/X11/sun4/tools/bin:/opt/staroffice7/program:/home/dlg24/bin:/usr/atria/bin:/support/d24/dept24/bin:/projects/n462files/stnfile/tools/bin:/vol/ccase/bin:/usr/perl5/bin:/projects/clearcase/bin
PERL5LIB=/home/dlg24/lib/perl:/vol/stnfb/lib/perl:/vol/sec/lib/perl::
PERLLIB=/home/dlg24/lib/perl:/vol/stnfb/lib/perl:/vol/sec/lib/perl::
PERL_BADLANG (unset)
SHELL=/bin/ksh