XML and character encoding
Hi,
The character encoding format is not recognized when I read an XML message
even with the property ENCODING declared to ISO-8859-1.
Here's a message that I send:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<signal>
<processus>
<name>PM-SERVER</name>
<type>5</type>
<msg/>
</processus>
</signal>"
Here's how I read it:
Dim XMLStream As StringReader = New
StringReader(Encoding.Default.GetString(bMsgXML))
Dim XMLReader As XmlTextReader = New XmlTextReader(XMLStream)
MsgBox(XMLReader.Encoding())
Note: bMsgXML is the XML message showed before in an array of bytes
Guess what?! XMLReader.Encoding is empty.... So, what's the problem?! (if I
put accented characters in my XML message, they become ? after decoding and
reading)
Thanks
Alban S.