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

[ID 20000323.059] mistruths in perlunicode.pod

Thread Next
March 23, 2000 20:56
[ID 20000323.059] mistruths in perlunicode.pod
Message ID:

This is a bug report for perl from,
generated with the help of perlbug 1.27 running under perl v5.5.670.

[Please enter your report here]

       o   Strings and patterns may contain characters that have
           an ordinal value larger than 255.  In Perl v5.6, this
           is only enabled if the lexical scope has a use utf8
           declaration (due to compatibility needs) but future
           versions may enable this by default.

This is apparently untrue.

  print ord(v2000), "\n";
  print ord("\x{7d0}"), "\n";

Both print "2000" regardless of whether use utf8 is in effect.  

I'm really not sure HOW this is supposed to work, but if this is correct
behavior, it seems like the explanation would have to refer to the fact
that there is a bit that indicates whether strings are byte- or UTF-8-
encoded and that, no matter whether use utf8 is in effect, there are
constructs that generate UTF-8-encoded strings.  If this is undesirable
(personally, I think being able to generate UTF-8-encoded strings
without use utf8 *is* desirable) then the holes that allow the
generation of UTF-8-encoded strings in this version of perl without 
use utf8 should be closed.

Also, it seems like there ought to be a built-in function (available
WITHOUT use utf8) that can be used to determine whether a string is
UTF-8-encoded.  Or at least it should be in a separate pragma module
or available in a way that doesn't inflict the semantics of utf8 on
programs.  Something like isutf8($str) = TRUE if $str is UTF-8-encoded,
or perhaps encoding($str) = 'UTF-8'.  Maybe there is such a built-in
or pragma already but I haven't found it in the docs.  (Yet.)

[Please do not change anything below this line]

Site configuration information for perl v5.5.670:

Configured by joseph at Wed Mar 22 17:29:59 MST 2000.

Summary of my perl5 (revision 5.0 version 5 subversion 670) configuration:
    osname=linux, osvers=2.2.12-20, archname=i586-linux-64all
    uname='linux 2.2.12-20 #1 mon sep 27 10:25:54 edt 1999 i586 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=define uselongdouble=define usesocks=undef
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.5.670:

Environment for perl v5.5.670:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About