public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey ``Bass'' Shcheglov <andrewbass@gmail.com>
To: cygwin@cygwin.com
Subject: Escape sequences unprocessed under the "cygwin" terminal
Date: Wed, 12 Oct 2016 10:32:00 -0000	[thread overview]
Message-ID: <57FDF60B.4000206@gmail.com> (raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi All,

I have a Java application which uses ANSI escape sequences to display
colours, position the cursor, etc.

It works fine under regular Unices, and also under |xterm| and |mintty|
(in Cygwin//), but I'm having trouble running it under the "|cygwin"|
terminal (i. e. |bash| launched from |cmd.exe|).

As you can see from the screen shot
(https://i.stack.imgur.com/Ohg41.png), escape sequences are output "as
is", without processing. On the other hand, I can easily run smth like
|echo -e '\033[1;31mTest'| -- and colour text will be just there.

At the same time, if I launch exactly the same application from a
Midnight Commander// <https://www.midnight-commander.org/> subshell,
escape sequences produced by the application will be interpreted
correctly: https://i.stack.imgur.com/jV7UW.png

Also, if I log in to my Windows box using SSH (i. e. replace the local
connection with the remote one, but retain the same |"cygwin|"
terminal), again, escape sequences are processed just fine.

It looks like when a subshell of some kind is created (|mc| or |ssh|),
the terminal is put into some other mode. But playing with |stty| wasn't
helpful, nor was export'ing |TERM=ansi|.

Could anyone please suggest any solution?

I'm running

> CYGWIN_NT-6.3 UNIT-725 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64 Cygwin
and Windows 8.1.

Thank you in advance.

Regards,
Andrey.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
 
iEYEARECAAYFAlf99goACgkQFX2weoTrDGefMgCdHrp7AxG/DHpOVyKR2YDF4+5c
4IgAoObfYU1JCrgZoCIcXyvH43xMm1QH
=Dp9M
-----END PGP SIGNATURE-----



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2016-10-12  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 10:32 Andrey ``Bass'' Shcheglov [this message]
2016-10-12 10:59 ` Marco Atzeri
2016-10-12 18:41   ` Andrey ``Bass'' Shcheglov
2016-10-12 18:46     ` Thomas Wolff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57FDF60B.4000206@gmail.com \
    --to=andrewbass@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).