From: Blackstone, J. D. <jda...@ci...> - 2002-06-20 13:48:08
|
> > This is an excellent question. I have had trouble with > different > > unix applications expecting \r, so it's not windows specific. > > Actually, "\r" is the correct thing to do to emulate the user > pressing > the <return> key. This will usually get translated to "\n" > in the pty > according to terminal settings, but this is of course > system-specific. I learned to use "\r" from the (TCL) Expect book, so it might provide even more information for the curious. We write our UNIX programs based on '\n' but it is the terminal that translates our return key (control-M or '\r') into the '\n'. The terminal is a UNIX thing, so who can fathom what Windows might do? :) Because of the Expect book, I always use "\r". Except when I forget (which can lead to interesting results). jdb |