Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"use utf8" accidentally sets utf8 flag on all barewords including ascii characters #9854

Closed
p5pRT opened this issue Aug 26, 2009 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 26, 2009

Migrated from rt.perl.org#68812 (status was 'resolved')

Searchable as RT68812$

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2009

From @miyagawa

The following test fails both on 5.10.1 and blead (per chip on #p5p).

The bareword on the left side of fat comma (=>) always gets utf8 flag
set, even if the characters only consist of ascii chars. See
http​://www.perlmonks.org/?node_id=668987 for more details.

use strict;
use utf8;
use Test​::More tests => 2;

my %foo = (a => 'b', 'c' => 'd');

for my $key (keys %foo) {
  ok !utf8​::is_utf8($key), "'$key' shouldn't have utf8 flag";
}


Flags​:
  category=
  severity=


This perlbug was built using Perl 5.10.0 - Sat Jul 25 12​:57​:07 PDT 2009
It is being executed now by Perl 5.10.1 - Wed Aug 19 01​:25​:08 PDT 2009.

Site configuration information for perl 5.10.1​:

Configured by miyagawa at Wed Aug 19 01​:25​:08 PDT 2009.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration​:

  Platform​:
  osname=darwin, osvers=9.7.0, archname=darwin-2level
  uname='darwin macbook-miyagawa.local 9.7.0 darwin kernel version
9.7.0​: tue mar 31 22​:52​:17 pdt 2009; root​:xnu-1228.12.14~1release_i386
i386 '
  config_args='-Dprefix=/opt/local -des'
  hint=recommended, useposix=true, d_sigaction=define
  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='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include',
  optimize='-O3',
  cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -I/opt/local/include'
  ccversion='', gccversion='4.0.1 (Apple Inc. build 5493)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  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='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='
-fstack-protector -L/usr/local/lib -L/opt/local/lib'
  libpth=/usr/local/lib /opt/local/lib /usr/lib
  libs=-ldbm -ldl -lm -lutil -lc
  perllibs=-ldl -lm -lutil -lc
  libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches​:


@​INC for perl 5.10.1​:
  /opt/local/lib/perl5/5.10.1/darwin-2level
  /opt/local/lib/perl5/5.10.1
  /opt/local/lib/perl5/site_perl/5.10.1/darwin-2level
  /opt/local/lib/perl5/site_perl/5.10.1
  .


Environment for perl 5.10.1​:
  DYLD_LIBRARY_PATH (unset)
  HOME=/Users/miyagawa
  LANG=ja_JP.UTF-8
  LANGUAGE (unset)
  LC_MESSAGES=C
  LC_TIME=C
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/Users/miyagawa/.gem/ruby/1.8/bin​:/Users/miyagawa/perl5/bin​:/Users/miyagawa/local/bin​:/Users/miyagawa/bin​:/sbin​:/usr/sbin​:/usr/local/sbin​:/bin​:/usr/local/bin​:/usr/bin​:/usr/local/ssl/bin​:/usr/local/samba/bin​:/usr/local/java/bin​:/var/qmail/bin​:/usr/local/pgsql/bin​:/usr/local/mysql/bin​:/usr/local/apache/bin​:/usr/local/squid/bin​:/usr/local/git/bin​:/opt/local/bin​:/opt/local/sbin
  PERL5LIB=
  PERL_AUTOINSTALL_PREFER_CPAN=1
  PERL_BADLANG=0
  PERL_MM_OPT=INSTALL_BASE=/Users/miyagawa/perl5
  SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2009

From @chipdude

fixed in blead

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2009

@chipdude - Status changed from 'new' to 'resolved'

@p5pRT p5pRT closed this as completed Aug 26, 2009
@p5pRT
Copy link
Author

p5pRT commented Jun 24, 2011

From aar@cpan.org

It seems that this bug was fixed in 5.12. Can you update this ticket with such information?
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant