ASCII encode

What you are referring to is HTML or XML encoding, not ASCII encoding.

This “encoding” is used so that characters with specific meaning to the HTML/XML parser can distinguish between data and reserved characters used in markup.

“Encoding” entails converting the reserved characters that appear within the data to what are called “character entities”. For example, < is converted to <

Within your FLOW service the typical approach to performing this encoding is to set the “encode” input parameter to true when calling pub.xml:documentToXMLString. This will perform encoding on all fields of the document. Side note: IMO, the default for this input is false but should be true. Callers should always set this to true unless there is a specific reason not to.

Another service that is available is pub.string:HTMLEncode. This can be useful in some scenarios when documentToXMLString is not used.

HTH