WriteSurrogateCharEntity
Forces the generation of a surrogate character entity for the specified string value.
Syntax
HRESULT WriteSurrogateCharEntity (WCHAR lowChar, WCHAR highChar);
Arguments
lowChar
Low-surrogate for the pair. The code value must be in the range U+DC00 - U+DFFF.highChar
High-surrogate for the pair. The code value must be in the range U+D800 - U+DBFF.
Return Value
Returns S_OK if no error is generated.
Remarks
A surrogate pair is defined as character code consisting of a sequence of two Unicode values, where the first value is a high-surrogate and the second value is a low-surrogate. The lowChar and highChar parameters must be a valid surrogate character pair, otherwise an error is returned and the writer does not produce output. The writer writes surrogate pairs in hexadecimal format.
The following code example produces a surrogate pair:
WriteSurrogateCharEntity(L'\uD800', L'\uDC00'));
For more information about writing surrogate pair characters, see WriteChars.
Requirements
Header: XmlLite.h
Library: XmlLite.lib