Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: A Win32 new Perl build dilemma

by Corion (Patriarch)
on Nov 29, 2021 at 07:25 UTC ( #11139208=note: print w/replies, xml ) Need Help??


in reply to A Win32 new Perl build dilemma

I don't use Cygwin, but I guess that all Cygwin programs run their output through an ANSI escape interpreter, while the Win32 Perl does not.

This would explain why you see the ANSI escapes interpreted with Cygwin Perl but raw with the Win32 Perl.

You can "fix" this by loading the module Win32::Console::ANSI in your program, which interprets the output as ANSI and instructs the Windows console to render it properly. Of course that means you should only load that module on "real" Win32 Perl, not Cygwin Perl.

use if $^O eq 'MSWin32', 'Win32::Console::ANSI';

Replies are listed 'Best First'.
Re^2: A Win32 new Perl build dilemma
by mikegold10 (Novice) on Nov 29, 2021 at 18:31 UTC
    Win32::Console::ANSI did not resolve the issue:
    C:\>perl -e "use warnings; use strict; use Win32::Console::ANSI; print ""\e[1;34mThis text is bold blue.\e[0m\n""; "
    ←[1;34mThis text is bold blue.←[0m
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139208]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2022-01-27 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?