setup and mintty (was Re: New setup.exe release?)

Andy Koppe
Mon May 23 19:42:00 GMT 2011

On 23 May 2011 17:04, Corinna Vinschen wrote:
> On May 23 11:33, Charles Wilson wrote:
>> Uhm, maybe? :-)
>> Here's the deal: run the following program from the ncurses-demo package:
>>       /usr/lib/ncurses/test/lrtest.exe
>> in a mintty terminal and bash-in-cmdbox, with the same UTF-8 $LANG
>> settings (I've tried C.UTF-8 and en_US.UTF-8).  FWIW,
>> TERM=xterm-256color in mintty, and TERM=cygwin in bash-in-cmdbox.
>> In the former, I see pseudo-line drawing characters (e.g hyphens and
>> plus signs, etc), but in the latter I see real line draw characters.
>> Why?
>> I suspect the reason is the terminfo settings for mintty (e.g. for
>> xterm-256color) specifies
>>       acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
>> (inherited via terminfo 'use' statements from xterm-basic), while the
>> terminfo settings for cygwin specify
>>       acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
>> e.g. the cygwin entry explicitly uses high codepoints for various line
>> draw stuff, (and cgywin's own terminal handling code does the magic to
>> replace them with unicode linedraw? or something?)
> Something.  I don't know how mintty works, but the Cygwin console knows
> the "switch to/from alternate charset" command "ESC [ 11 m", "ESC [ 10
> m".  The alternate charset is always codepage 437 which has the line
> drawing chars at known single-byte positions in the >= 128 region.
> This is apparently used by ncurses when running in a console window,
> but perhaps not when running in mintty.
> Whatever that is, I guess it may not be overly tricky to implement in
> mintty as well, *if* somebody takes the time to report the problem.

Mintty does support that already. The feature was introduced by a
certain three-letter PC Unix company, and the Linux console supports
it too.

The DEC vtXXX series did not have that, however, which is why xterm
doesn't either. Instead, they have the "DEC Special Character and Line
Drawing Set". When activated, character codes 0x60 to 0x7E map to
those special characters, as shown here: Mintty supports that
one too.

>> My point: there are some things that don't yet seem to work "right" in
>> mintty, and I'm not really sure where the problem is.

Chuck, what font are you using in mintty? It could just be that it
doesn't have glyphs for the relevant codepoints, in which case mintty
falls back to ASCII replacements. The default Lucida Console does have
the linedrawing glyphs needed for the vt100 set.

If it's not that, then the xterm terminfo entry would indeed need a closer look.

You can test support for the CP437 alternate charset, the vt100
graphics, and also direct Unicode line drawing by catting the attached
file created by Thomas Wolff.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xgraphics
Type: application/octet-stream
Size: 800 bytes
Desc: not available
URL: <>

More information about the Cygwin-apps mailing list