Can you share the flow snippet and a sample xml?
I think you are using the service “pub.xml:documentToXMLString”, set encode, check the BIS guide.