in reply to line breaks in textarea; end of line characters?

Okay, false alarm. I figured out how to preserve the line endings.

BUT I still am interested in info about line endings and how to look at what is at the end of a line of text.

What is cJ, cM, cJcM and their relationship to \r, \n, etc. Are there more?



Michael Jensen
michael at inshift.com
http://www.inshift.com
  • Comment on Re: line breaks in textarea; end of line characters?

Replies are listed 'Best First'.
Re: Re: line breaks in textarea; end of line characters?
by etcshadow (Priest) on Oct 23, 2003 at 03:19 UTC
    cJ or ^J (or ctrl-J) are some applications' means of representing the newline character (NL, "\n", ascii 0x0A, etc). Likewise cM or ^M (or ctrl-M) for the carriage return character (CR, "\r", ascii 0x0D).

    ------------
    :Wq
    Not an editor command: Wq
Re^2: line breaks in textarea; end of line characters? (a rant)
by tye (Sage) on Oct 23, 2003 at 14:24 UTC

    "\cJ" is CTRL-J ("Control J"), which is what ASCII uses for "\n". "\cM" is CTRL-M, which is what ASCII uses for "\r". (Old Macs claim to be ASCII but get these two associations backward.)

    You might want to read a recent related rant of mine: Re^4: Line Feeds (rumor control)

                    - tye