Skip Menu |

This queue is for tickets about the Class-Std CPAN distribution.

Report information
The Basics
Id: 14080
Status: resolved
Priority: 0/
Queue: Class-Std

People
Owner: Nobody in particular
Requestors: stbaldwin [...] multiservice.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.0.4
Fixed in: (no value)



Subject: UTF-8 Issues with Class::Std (possible broken Perl)
Hi Damian, I'm sure this is not a bug with Class::Std, but that's where it is manifesting, and I really want to use Class::Std, so I'm hoping you can give me some clues as to how to fix it. I'm seeing (apparently) utf-8 related problems with using Class::Std. The perl version is that which comes with Red Hat Enterprise Linux 3. For example ... [stbaldwin@opbld01 Class]$ perl -e 'use Class::Std' Malformed UTF-8 character (unexpected continuation byte 0xab, with no preceding start byte) in require at /usr/lib/perl5/site_perl/5.8.0/Class/Std.pm line 62. Malformed UTF-8 character (unexpected continuation byte 0xbb, with no preceding start byte) in require at /usr/lib/perl5/site_perl/5.8.0/Class/Std.pm line 62. Malformed UTF-8 character (unexpected continuation byte 0xbb, with no preceding start byte) in require at /usr/lib/perl5/site_perl/5.8.0/Class/Std.pm line 62. [stbaldwin@opbld01 stbaldwin]$ perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.21-23.elsmp, archname=i386-linux-thread-multi uname='linux bug' config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef' useithreads=define usemultiplicity= useperlio= d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=un uselongdouble= usemymalloc=, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.2.3 20030502 (Red Hat Linux 3.2.3-49)', gccosandvers='' gccversion='3.2.3 200305' intsize=o, longsize=s, ptrsize=l, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long' k', ivsize=4' ivtype='long' known_exten, nvtype='double', nvsize=, Off_t='', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc' l', ldflags =' -' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil perllibs= libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libper gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' cccdlflags='-fPIC' ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s Unicode/Normalize XS/A' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Locally applied patches: MAINT18379 Built under linux Compiled at Feb 1 2005 09:37:17 @INC: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 . [stbaldwin@opbld01 stbaldwin]$ uname -a Linux opbld01.multiservice.com 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686 i686 i386 GNU/Linux Any clues you have to help me solve this would be most appreciated. Thanks mate, Steve Baldwin
Date: Tue, 09 Aug 2005 12:42:34 -0600
From: Damian Conway <damian [...] conway.org>
To: bug-Class-Std [...] rt.cpan.org
Subject: Re: [cpan #14080] UTF-8 Issues with Class::Std (possible broken Perl)
RT-Send-Cc:
Might be a bug in 5.8.0 or an endianness issue. Try removing the line: | :$key« \s* ([^»]*) \s* » and see if that solves your problem. Damian
[damian@conway.org - Tue Aug 9 14:42:51 2005]: Show quoted text
> Might be a bug in 5.8.0 or an endianness issue. > > Try removing the line: > > | :$key« \s* ([^»]*) \s* » > > and see if that solves your problem. > > Damian
Removing this line does indeed solve the problem. Is this going to break/restrict any functionality in Class::Std (I'm sure it was there for a purpose)? Here's some more info that may or may not be relevant ... Here's some more info that may or may not be relevant (using the unmodified package) ... [stbaldwin@opbld01 Class]$ echo $LANG en_US.UTF-8 [stbaldwin@opbld01 Class]$ perl -e 'use Class::Std' Malformed UTF-8 character (unexpected continuation byte 0xab, with no preceding start byte) in require at /usr/lib/perl5/site_perl/5.8.0/Class/Std.pm line 62. Malformed UTF-8 character (unexpected continuation byte 0xbb, with no preceding start byte) in require at /usr/lib/perl5/site_perl/5.8.0/Class/Std.pm line 62. Malformed UTF-8 character (unexpected continuation byte 0xbb, with no preceding start byte) in require at /usr/lib/perl5/site_perl/5.8.0/Class/Std.pm line 62. [stbaldwin@opbld01 Class]$ unset LANG [stbaldwin@opbld01 Class]$ perl -e 'use Class::Std' [stbaldwin@opbld01 Class]$ Steve
Date: Tue, 09 Aug 2005 13:06:46 -0600
From: Damian Conway <damian [...] conway.org>
To: bug-Class-Std [...] rt.cpan.org
Subject: Re: [cpan #14080] UTF-8 Issues with Class::Std (possible broken Perl)
RT-Send-Cc:
Show quoted text
> Removing this line does indeed solve the problem. Is this going to > break/restrict any functionality in Class::Std (I'm sure it was there > for a purpose)?
It's going to mean you can't use Perl6ish double angles on :init, :default_val, etc. specifications within an :ATTR. No great impediment, I suspect. A better alternative than removing the line might be for you to simply replace it with: | :$key\x{AB} \s* ([^\x{BB}]*) \s* \x{BB} Damian
Your new suggestion works fine. Does this mean there is something broken with our Perl, or do we need a later version? Obviously we would prefer to be using the 'vanilla' Class::Std rather than our own hacked version. Regards, Steve
Date: Tue, 09 Aug 2005 14:28:17 -0600
From: Damian Conway <damian [...] conway.org>
To: bug-Class-Std [...] rt.cpan.org
Subject: Re: [cpan #14080] UTF-8 Issues with Class::Std (possible broken Perl)
RT-Send-Cc:
Show quoted text
> Your new suggestion works fine. Does this mean there is something > broken with our Perl, or do we need a later version?
I'm not sure. 5.8.3 on MacOS handled it fine. But that may have been the MacOSity, not the 5.8.3ity. Show quoted text
> Obviously we would > prefer to be using the 'vanilla' Class::Std rather than our own hacked > version.
When the next release goes out, that "hack" will become the "vanilla". All the best, Damian