UnescapeText Method
static MCD_STR CMarkup::UnescapeText( MCD_CSTR szText, int nTextLength = -1 );
The UnescapeText static utility function is used internally to unescape the Standard Special Characters when extracting a text value from the document. You can use it to unescape special characters when dealing with markup text directly.
The UnescapeText function works for both null terminated strings and strings that are not if nTextLength is specified. The Standard Special Characters are decoded, as are any Numeric Character References. Any unrecognized entity references are left unchanged.
See also EscapeText.
It shouldn't be able to convert uuml because it only supports the 5 standard XML entities amp, quot, apos, lt and gt (see Standard Special Characters). To get uuml you would need to use the numeric character reference Ü. There might be a bug in UnescapeText for MBCS where it attempts to generate a character for a zero code point; this is something I will look at and fix in the next release. It could be that wctomb has a different behavior on invalid arguments in the different compilers. It is probably not related to your issue, but I will also mention that
CMarkup does not support entities declared in the DTD since it ignores the content of the DTD. I had not thought of putting HTML entities like uuml in CMarkup, but since CMarkup supports forms of non-XML markup (see Other Markup) I will probably add the additional entities in an upcoming release if I can devise a succinct lookup mechanism. Thanks for the suggestion.
|