develooper Front page | perl.perl5.porters | Postings from April 2019

[perl #121783] Windows: UTF-8 encoded output in cmd.exe with codepage 65001 causes unexpected output

From:
Karl Williamson via RT
Date:
April 16, 2019 04:10
Subject:
[perl #121783] Windows: UTF-8 encoded output in cmd.exe with codepage 65001 causes unexpected output
Message ID:
rt-4.0.24-15582-1555387838-1859.121783-15-0@perl.org
On Mon, 12 Mar 2018 12:31:59 -0700, nanis@cpan.org wrote:
> With stock 5.26.1 compiled using Visual Studio 2017, I get
> 
> C:\> perl -e "print qq{\xce\xb1\xce\xb2\xce\xb3123}"
> αβγ123
> 
> so, it looks like the problem does not exist any more. I did not try
> Tony's patch, and I do not know if it made it into the source in the
> intervening period.
> 

Does anyone object to closing this ticket then.  It's a Windows bug, and Windows has been fixed in modern versions.  We shouldn't have to add a work around for things that MS aren't supporting.

> Summary of my perl5 (revision 5 version 26 subversion 1) configuration:
> 
>   Platform:
>     osname=MSWin32
>     osvers=10.0
>     archname=MSWin32-x64-multi-thread
>     uname=''
>     config_args='undef'
>     hint=recommended
>     useposix=true
>     d_sigaction=undef
>     useithreads=define
>     usemultiplicity=define
>     use64bitint=define
>     use64bitall=define
>     uselongdouble=undef
>     usemymalloc=n
>     default_inc_excludes_dot=define
>     bincompat5005=undef
>   Compiler:
>     cc='cl'
>     ccflags ='-nologo -GF -W3 -Ox -favor:INTEL64 -Qspectre -Qpar
> -volatile:ms -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE
> -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE
> -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS
> -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
> -DWIN32_NO_REGISTRY'
>     optimize='-Ox -favor:INTEL64 -Qspectre -Qpar -volatile:ms -MD -Zi
> -DNDEBUG -GL -fp:precise'
>     cppflags='-DWIN32'
>     ccversion='19.12.25835'
>     gccversion=''
>     gccosandvers=''
>     intsize=4
>     longsize=4
>     ptrsize=8
>     doublesize=8
>     byteorder=12345678
>     doublekind=3
>     d_longlong=undef
>     longlongsize=8
>     d_longdbl=define
>     longdblsize=8
>     longdblkind=0
>     ivtype='__int64'
>     ivsize=8
>     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 -ltcg
> -libpath:"c:\opt\perl\5.26.1\lib\CORE"  -machine:AMD64'
>     libpth="C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\VC\Tools\MSVC\14.12.25827\\lib\x64"
>     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 vcruntime.lib ucrt.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
> vcruntime.lib ucrt.lib
>     libc=ucrt.lib
>     so=dll
>     useshrplib=true
>     libperl=perl526.lib
>     gnulibc_version=''
>   Dynamic Linking:
>     dlsrc=dl_win32.xs
>     dlext=dll
>     d_dlsymun=undef
>     ccdlflags=' '
>     cccdlflags=' '
>     lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg
> -libpath:"c:\opt\perl\5.26.1\lib\CORE"  -machine:AMD64'
> 
> 
> Characteristics of this binary (from libperl):
>   Compile-time options:
>     HAS_TIMES
>     HAVE_INTERP_INTERN
>     MULTIPLICITY
>     PERLIO_LAYERS
>     PERL_COPY_ON_WRITE
>     PERL_DONT_CREATE_GVSV
>     PERL_IMPLICIT_CONTEXT
>     PERL_IMPLICIT_SYS
>     PERL_MALLOC_WRAP
>     PERL_OP_PARENT
>     PERL_PRESERVE_IVUV
>     USE_64_BIT_ALL
>     USE_64_BIT_INT
>     USE_ITHREADS
>     USE_LARGE_FILES
>     USE_LOCALE
>     USE_LOCALE_COLLATE
>     USE_LOCALE_CTYPE
>     USE_LOCALE_NUMERIC
>     USE_LOCALE_TIME
>     USE_NO_REGISTRY
>     USE_PERLIO
>     USE_PERL_ATOF
>   Built under MSWin32
>   Compiled at Feb  1 2018 14:31:56
>   %ENV:
>     PERLDOC_PAGER=""c:\Program Files\git\usr\bin\less.exe""
>     PERL_CPANM_OPT="--from https://cpan.metacpan.org/"
>   @INC:
>     c:/opt/perl/site/5.26.1/lib/MSWin32-x64-multi-thread
>     c:/opt/perl/site/5.26.1/lib
>     c:/opt/perl/5.26.1/lib
> 
> 
> On Mon, Mar 12, 2018 at 3:19 PM, Karl Williamson via RT
> <perlbug-followup@perl.org> wrote:
> > On Fri, 10 Feb 2017 15:39:07 -0800, nanis@cpan.org wrote:
> >> On Fri, Feb 10, 2017 at 6:09 PM, Tomasz Konojacki via RT
> >> <perlbug-followup@perl.org> wrote:
> >> ...
> >>
> >> > Right now I only have access to Windows XP and 10 machines, and I can
> >> > confirm that WriteFile() bug exists in XP but *not* in Windows 10.
> >> >
> >> > I *think* it was fixed in Windows 8, but I can't say it for sure
> >> > right now.
> >>
> >> Similar situation here. I do have a Vista laptop I can try it out on
> >> when I get a chance.
> >>
> >> -- Sinan
> >
> > What is the status of this?
> > --
> > Karl Williamson


-- 
Karl Williamson

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121783



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