wwxml::nEncoding

Determines how generated XML documents are encoded. By default no encoding occurs (0).

Converts an ANSI XML string (as generated by VFP code such as using CursorToXML()) into a fully compliant UTF-8 compliant document. UTF-8 encoding encodes extended characters with extra characters. Only characters > ASCII 127 are encoded so this scheme is fairly efficient with regular text.

This encoding is required when displaying XML directly in the browser when extended characters are present or when using XMLHTTP to download data from the server. These clients have problems with non-encoded strings because they presume Unicode data from the start and don't perform proper ANSI conversions. VFP clients passing data to the parser, however cannot pass UTF-8 strings because the parser will try to do a Unicode conversion on the UTF-8 string which will result in invalid data in the document.

If you use explicit LoadXML operations on the via the XML parser on the XML client you don't need to call this method first. Use it if you get errors for Invalid Character found in XML stream.

For more information on how XML encoding is dealt with in the MSXML parser see the following MSDN article:

http://msdn.microsoft.com/xml/articles/xmlencodings.asp

o.nEncoding

Default Value

0 - no encoding (default)
1 - UTF8 encoded

See also:

Class wwXML (High Level Methods)

© West Wind Technologies, 1996-2022 • Updated: 09/01/01
Comment or report problem with topic