What you do depends on what the receiving system expects to receive to accomplish what you want. In your first example you have a n following the colon. In the second example you have a space. The method for inserting control characters into text rather than having the control character acted upon by the editor itself depends on the editor. In vi, for example, to insert a control character you must precede it with a Control-V
Generally speaking, you want to insert whatever the receiving system will interpret as a Line Break. They might even be looking for something different like an HL7 .br or an HTML
. Ask them.
We have a lot of people here on CloverTech who come from a clinical rather than programming background. Let me try to shed some light on a few terms for them.
CARRIAGE RETURN (strict usage: just like a typewriter, it sends the cursor to the leftmost position on the same line) can be represented in several ways:
r, CR, ^M, Control-M, x0d, 13 (decimal), 015 (octal), 0d (hex), ASCII 13
LINE FEED (strict usage: moves the cursor down one line at the same column position) is also known as:
n, LF, ^J, Control-J, x0a, 10 (decimal), 012 (octal), 0a (hex), ASCII 10
LINE TERMINATORS are made up of one or more characters, defined first by the operating system and may be redefined by the application:
UNIX/LINUX: Line Feed (n)
WINDOWS/DOS: Carriage Return Line Feed Pair (rn)
MAC: Carriage Return (r)