When a field of type TX, FT, or CF is being encoded, the escape character may be used to signal certain special characteristics of portions of the text field. The escape character is whatever display ASCII character is specified in the Escape Character component of MSH-2-encoding characters. For purposes of this section, the character \ will be used to represent the character so designated in a message. An escape sequence consists of the escape character followed by an escape code ID of one character, 0 or more data characters, and another occurrence of the escape character. The following escape sequences are defined:
\H\ |
start highlighting |
\N\ |
normal text (end highlighting) |
\F\ |
field separator |
\S\ |
component separator |
\T\ |
subcomponent separator |
\R\ |
repetition separator |
\E\ |
escape character |
\Xdddd...\ |
hexadecimal data |
\Zdddd...\ |
locally defined escape sequence |
The escape sequences for field separator, component separator, subcomponent separator, repetition separator, and escape character are also valid within an ST data field.
No escape sequence may contain a nested escape sequence.