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

Re: New line handling in a server


On Wednesday, May 18, 2022 11:57:46 AM CEST Levente wrote:
> Hi,

Hey!

> 
> 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?

The data you receive is your responsibility. libssh doesn't alter it.


	Andreas

-- 
Andreas Schneider                 asn@xxxxxxxxxxxxxx
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D



References:
New line handling in a serverLevente <leventelist@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org