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

[perl #120855] utf8 flag is lost is 'use utf8' comes after 'use open encoding'

Thread Previous | Thread Next
From:
Ruslan Shvedov
Date:
December 25, 2013 09:28
Subject:
[perl #120855] utf8 flag is lost is 'use utf8' comes after 'use open encoding'
Message ID:
rt-4.0.18-30850-1387863260-1700.120855-75-0@perl.org
# New Ticket Created by  Ruslan Shvedov 
# Please include the string:  [perl #120855]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=120855 >


Cc: ruslan.shvedov@gmail.com
Subject: utf8 flag is lost is 'use utf8' comes after 'use open encoding'
Message-Id: <5.14.2_3276_1387862807@GLADIUS>
Reply-To: ruslan.shvedov@gmail.com
To: perlbug@perl.org
From: ruslan.shvedov@gmail.com


This is a bug report for perl from ruslan.shvedov@gmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.2.


-----------------------------------------------------------------
[Please describe your issue here]

The below test fails
===============================================================
use strict;
use warnings;

use open ':std', ':encoding(utf8)';
use utf8;

use Test::More tests => 1;

my $s = '2♥ 5♥ 7♦ 8♣ 9♠';

ok utf8::is_utf8($s), "String '$s' is utf8 even if 'use utf8;' goes after
'use open ':std', ':encoding(utf8)'";
===============================================================

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

Configured by Ruslan at Wed Jan 11 14:45:47 2012.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration:

  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='13.10.3077', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
 -libpath:"c:\perl-5.14.2\lib\CORE"  -machine:x86'
    libpth="c:\Program Files\Microsoft Visual Studio .NET 2003\VC7\lib"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
comctl32.lib msvcrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
comctl32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl514.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf  -libpath:"c:\perl-5.14.2\lib\CORE"  -machine:x86'

Locally applied patches:


---
@INC for perl 5.14.2:
    c:/perl-5.14.2/site/lib
    c:/perl-5.14.2/lib
    .

---
Environment for perl 5.14.2:
    CYGWIN=nodosfilewarning
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=c:\perl-5.14.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;c:\bat;c:\perl\bin;c:\cygwin\bin;c:\Apache2\bin;C:\Program
Files\Universal Extractor;C:\Program Files\Universal
Extractor\bin;c:\Go\bin;C:\Program
Files\Mercurial;C:\cygwin\usr\local\bin;C:\Program
Files\Java\jdk1.7.0_09\bin;C:\Program Files\Calibre2\;
    PERL_BADLANG (unset)
    SHELL (unset)


Thread Previous | Thread Next


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