WriteSurrogateCharEntity (IXmlWriterLite)
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 a UTF-16 character code that consists of a sequence of two UCF-2 Unicode values: a high-surrogate and a low-surrogate. The lowChar
and highChar
parameters must form a valid surrogate pair. Otherwise an error is returned and the writer does not produce output. The writer writes surrogate pairs in hexadecimal format.
The following example produces a surrogate pair:
WriteSurrogateCharEntity(L'\uD800', L'\uDC00'));
For more information about how to write surrogate pair characters, see WriteChars (IXmlWriterLite).
Requirements
Header: XmlLite.h
Library: XmlLite.lib