Win32 Ansi

I’m busy developing the irc-transport for and the debuging output is coloured via ANSI escape sequences. This works great on a linux terminal, or via PuTTY, but not so great in a win32 console. I searched quite hard on Google for a ‘modern’ ansi.sys or replacement, but couldn’t find anything.

So here’s my attempt at making something work in win32.

The executable will spawn a copy of the default command shell (from COMPSEC), unless you give it something to run on the command line. Basically it pump’s stdout and stderr, and parses the ANSI escape codes into win32 console API calls. For quick development I wrote it up in c#, but it looks like some of the .net console async pipe handling code blocks badly, so I may end up porting it to plain c.

One comment on “Win32 Ansi

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>