MSDN Library

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.


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)


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)
Characters that are special RTF symbols (\,{, or }) should always be escaped, preferably using the \'hh syntax.
© 2015 Microsoft