Skip to main content

dfXMLUTF8

dfXMLUTF8 = 2

Example

procedure SaveUtf8XmlPacket(const FileName: String);
begin
DATA1.SaveToFile(FileName, dfXMLUTF8);
end;

Usage

dfXMLUTF8 selects the MIDAS XML packet representation with extended characters encoded as UTF-8 bytes.

Additional Technical Info

dfXMLUTF8 is ordinal 2 of TDataPacketFormat. Current Delphi client-dataset code maps it to MIDAS xmlUTF8, producing the XML packet form with extended characters represented as UTF-8.

It is normally the portable text choice when a receiver explicitly supports MIDAS XML/UTF-8. It does not turn the packet into arbitrary business XML, remove dataset metadata, normalize Unicode or guarantee that downstream code respects the declared encoding.

Select the format through this argument rather than inferring it from extension. Treat the result as bytes at a stream boundary; do not pass it through an ANSI String conversion. File and stream mutation, cursor, truncation, allocation and exception rules remain those of the chosen save method.

The example is source-reviewed only; no packet or filesystem operation ran.

External references

Created 2026-07-15