ANSI codes consist of an escape character (27, if my memory is correct),
followed by a [, then typically (though not always) a set of numbers,
sometimes a semicolon followed by another set of numbers, and then a letter
command.  It was first thought this was a WinSSHd problem, but it's actually
a problem for other platforms too.  ANSI is the standard way to colourize
the terminal and move the cursor around.
http://en.wikipedia.org/wiki/ANSI_escape_code
Even from WinXP -> WinXP, using JSch, for some reason the escape codes
aren't being detected by the terminal.  I have a feeling that's do to some
Java convention, or something to do with Unicode.  There's codes for a lot
of stuff, like move to an absolute position on the screen, and move the
cursor up, down, left, or right so many positions.

I was able to hack together inside Channel.java a fix for this issue, but it
breaks (non existant) compatibility with linux Curses apps.

On 8/24/07, Atsuhiko Yamanaka <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>    +-From: "Cody Harris" <[EMAIL PROTECTED]> --
>    |_Date: Wed, 22 Aug 2007 15:32:36 -0400 _____
>    |
>    |In my environment, we use JSch to run commands on remote
> machines.  When we
>    |connect to a Windows machine, running WinSSHd, JSch does not properly
> parse
>    |the ANSI escape codes properly, and instead prints them out.  Is this
> a
>    |known problem, or is there a work around available?  It's possible for
> me
>    |to hack up the source, but I don't want to reinvent the wheel.
>
>
> Thank you for your feedback, but I could not understand your problem.
> What kind of the ASNI escape codes should be parsed in JSch?
>
>
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
>     +1-415-578-3454
> Fax +81-22-224-8773
> Skype callto://jcraft/
>



-- 
Website: http://vectec.net
Blog: http://blog.vectec.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to