I installed XMLWriter to use UTF8 encoding, but the WriteStartDocument method still writes the UTF16 tag.
This is part of the code:
m_sbXML = New System.Text.StringBuilder m_xmlWriterSettings = New System.Xml.XmlWriterSettings With m_xmlWriterSettings .Indent = True .IndentChars = " " .Encoding = System.Text.Encoding.UTF8 End With m_xmlWriter = System.Xml.XmlWriter.Create(m_sbXML, m_xmlWriterSettings) Call m_xmlWriter.WriteStartDocument()
He should write a document tag:
<?xml version="1.0" encoding="utf-8"?>
but instead he writes:
<?xml version="1.0" encoding="utf-16"?>
user564548
source share