Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Escaped Expressions

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
 

An escape expression (for example, \'hh, \\, or \{) is usable in all RTF control words.

Writer:

In general RTF should be written out with all characters above 0x80 in the escaped form, \'hh.

Character codeWrite out as
0x00 <= ch < 0x20Escaped (\'hh)
0x20 <= ch < 0x80Raw (non-escaped) character
0x80 <= ch <= 0xFFEscaped (\'hh)
0x5C, 0x7B, 0x7D (special RTF characters \,{, or })Escaped (\'hh)

Reader:

When the RTF reader encounters raw characters in the leading-byte range of the double-byte character, it regards the next character as the trailing byte of the double-byte character and combines the two characters into one double-byte character.

Leading byteTrailing byteValidity
EscapedRaw (0x20 <= ch <= 0x7f) Valid (standard format for double-byte character)
EscapedEscaped (other)Valid (standard format for double-byte character)
RawRawValid (RTF-J format for double-byte character)
RawEscapedInvalid
Note
   
Characters that are special RTF symbols (\,{, or }) should always be escaped, preferably using the \'hh syntax.
Show:
© 2015 Microsoft