in reply to Term::ReadLine and Term::ANSIColor don't play well on Windows

From the Term::ANSIColor documentation: "Note that not all displays are ISO 6429-compliant, or even X3.64-compliant (or are even attempting to be so). This module will not work as expected on displays that do not honor these escape sequences, such as cmd.exe, 4nt.exe, and command.com under either Windows NT or Windows 2000. They may just be ignored, or they may display as an ESC character followed by some apparent garbage."

  • Comment on Re: Term::ReadLine and Term::ANSIColor don't play well on Windows

Replies are listed 'Best First'.
Re^2: Term::ReadLine and Term::ANSIColor don't play well on Windows
by kubrat (Scribe) on Mar 26, 2013 at 20:18 UTC

    The problem is that Term::ANSIColor does work on its own and on cmd.exe.

    But it won't work when you try to output colors through Term::ReadLine's OUT handle on cmd.exe. And it is only this combination that does not work. If you try the same thing on Linux then all is well.

    Also, as far as I can tell there are other modules that expected it to work like Devel::REPL for example.
      Even on Linux one is confronted with coloring problems e.g. when trying to have syntax highlighting within the debugger.

      Term::ReadLine is only a wrapper using which ever underlying module is installed. The full list of features is only supplied by Term::ReadLine::Gnu , which builds on a Gnu-Readline programmed in C.

      So what are you using on Win???

      Since finding support for these issues in GNU-Readline isn't easy, I suppose that only reimplementing the full library in Perl can help here.

      Are you volunteering?

      Cheers Rolf

      ( addicted to the Perl Programming Language)