[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New line handling in a server


Hi,



I'm developing a CLI using an ssh server, and everything works as expected, except for the new line character.

I experience that my client (ssh) sends \n as newline character, but also the client requires \r\n to have proper new line when receiving text. Otherwise I get something like this:

This is a
          new line, and
                        another.

This is strange, because if I use the same client, and login to a linux server, and I test for \n it works as expected:

$ echo -e "Test \n for newline"
Test
 for newline


Are there any settings in libssh to make my client interpret \n as new line like in my ssh session?



Thanks,
Levente

--
Levente Kovacs
Senior Electronic Engineer

W: http://levente.logonex.eu

Follow-Ups:
Re: New line handling in a serverAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org