From: Frank da Cruz (fdc@columbia.edu)
Date: Thu Aug 28 2008 - 08:00:27 CDT
> "Unknown Umut" <js underscore bach at freenet dot de> wrote:
>
> > I am trying to print utf-8 strings with colors in ansi-c with help of
> > wchar.h and friends. I get any language(japanese, german etc), no
> > problem but not in colored. The ansi color notation that i am used to,
> > \033[0;34m
> > \033[0;35m
> > doesn't work with unicode( in wprintf). Now my question is,
> > as the coding of colors in ansi consist of characters whose decimal
> > value less than 255 and unicode backward-compatible is, why would my
> > wprintf attempts fail?
>
> It shouldn't make any difference, as you said (though the magic value is
> 128 and not 255).
>
> Just out of curiosity, what operating environment are you working in?
> Modern versions of Windows, for example, don't seem to honor ANSI X3.64
> escape codes even if you use ANSI.SYS. I wanted to do this in XP and
> ended up writing a utility that does all the emulation.
>
For the record, Kermit 95 for Windows is a terminal emulator that supports
ANSI special effects as well as UTF-8, and because of the super-sane design
of UTF-8, there are no problems with this combination. I have some screen
shots here showing ANSI effects such as color as well as UTF-8 screens
with different scripts:
http://www.columbia.edu/kermit/k95utf.html
I don't think any of these shows UTF-8 and color on the same screen, but
highlighting is shown on the third screen in this page:
http://www.columbia.edu/kermit/k95glass.html
and color works the same way (it's just another kind of highlighting).
- Frank
This archive was generated by hypermail 2.1.5 : Thu Aug 28 2008 - 08:04:26 CDT