develooper Front page | perl.perl5.porters | Postings from December 2000

[ID 20001230.002] \C doesn't work with the utf8 pragma

From:
jhi
Date:
December 30, 2000 12:49
Subject:
[ID 20001230.002] \C doesn't work with the utf8 pragma
Message ID:
200012302049.WAA22389@alpha.hut.fi

This is a bug report for perl from jhi@kosh.hut.fi,
generated with the help of perlbug 1.33 running under perl v5.7.0.


-----------------------------------------------------------------
[Please enter your report here]

As reported by Owen Taylor (see below for pointers to the original
messages sent to perl-unicode), the regex \C metacharacter doesn't
quite work with the utf8 pragma.  *Without* the use utf8 the below
test script (modified from Owen's original) succeeds.  In case some
mail software mangles the message, the strings after the unless start
with the UTF-8 encoding of \x{c9}, LATIN CAPITAL LETTER E WITH ACUTE,
bytes 0xc3 0x89.

{
    use utf8;

    print "not " unless "École" =~ /^\C\C(.)/ && $1 eq 'c';
    print "ok 1\n";

    print "not " unless "École" =~ /^\C\C(c)/;
    print "ok 2\n";
}

(All this with Inaba's big UTF-8 patch, change #8267.)

The original messages:

Subject: \C, UTF-8, and regular expressions
From: Owen Taylor <otaylor@redhat.com>
Date: 02 Aug 2000 19:17:51 -0400
Message-ID: <ybeu2d3ckww.fsf@fresnel.labs.redhat.com>

Subject: Re: \C, UTF-8, and regular expressions
From: Owen Taylor <otaylor@redhat.com>
Date: 03 Aug 2000 02:49:11 -0400 
Message-ID: <ybevgxizvo8.fsf@fresnel.labs.redhat.com>

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.7.0:

Configured by jhi at Sat Dec 30 22:33:44 EET 2000.

Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration:
  Platform:
    osname=dec_osf, osvers=4.0f, archname=alpha-dec_osf
    uname='osf1 kosh.hut.fi v4.0 1229 alpha '
    config_args='-des -Dusedevel -Doptimize=-g -Dccflags=-DDEBUGGING'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -std -DDEBUGGING -DLANGUAGE_C',
    optimize='-g',
    cppflags='-DDEBUGGING -std -DDEBUGGING -DLANGUAGE_C'
    ccversion='V5.9-010', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =''
    libpth=/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib
    libs=-lgdbm -ldbm -ldb -lm -liconv -lutil
    perllibs=-lm -liconv -lutil
    libc=/usr/shlib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-rpath,/usr/local/lib/perl5/5.7.0/alpha-dec_osf/CORE'
    cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -g -msym -std'

Locally applied patches:
    DEVEL8268

---
@INC for perl v5.7.0:
    lib
    /u/vieraat/vieraat/jhi/Perl/lib
    /usr/local/lib/perl5/5.7.0/alpha-dec_osf
    /usr/local/lib/perl5/5.7.0
    /usr/local/lib/perl5/site_perl/5.7.0/alpha-dec_osf
    /usr/local/lib/perl5/site_perl/5.7.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.7.0:
    HOME=/u/vieraat/vieraat/jhi
    LANG=C
    LANGUAGE (unset)
    LC_ALL=fi_FI.ISO8859-1
    LC_CTYPE=fi_FI.ISO8859-1
    LD_LIBRARY_PATH=/u/vieraat/vieraat/jhi/pp4/perl
    LOGDIR (unset)
    PATH=/u/vieraat/vieraat/jhi/Perl/bin:/u/vieraat/vieraat/jhi/.s:/u/vieraat/vieraat/jhi/.b/OSF1:/c/bin:/p/bin:/p/adm/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ccs/bin:/usr/lib:/etc:/lib:/p/X6/bin:/p/X5/bin:/usr/bin/X11:/usr/lbin:/usr/sbin/acct:/usr/tcb/bin:/tcb/bin:/usr/field:/u/vieraat/vieraat/jhi
    PERLLIB=/u/vieraat/vieraat/jhi/Perl/lib
    PERL_BADLANG (unset)
    SHELL=/bin/zsh




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About