Discfile.CREATE('C:\temp\SoapXml1.xml'); Discfile.CREATEOUTSTREAM(DiscOutStream); StreamWriter := StreamWriter.StreamWriter(DiscOutStream, Encoding.Unicode); StreamWriter.Write(SOAPRequestXml); StreamWriter.Flush(); StreamWriter.Close();
BUT, I must have the BigText loaded into a XmlDoc ( no file ), with the right encoding.
Answers
Could you please explain this. What exactly do you do when? It does not make any sense to me that the content of a BigText varible would somehow change when loaded into a DOM, because the BigText variable is only read, not written to during this process.
Can't you solve your problem by using the Textencoding parameter of CREATEOUTSTREAM?
And, after you loaded your text into an XmlDoc, why don't you use it to write to the file? This way, the encoding given in the xml declaration will match the encoding of the file.
This solved my problem
TEXTENCODING::UTF8
Thanks