XML encoding
This uses XML declarations to determine encoding for both inbound and outbound messages. Selecting Encoding field to be unavailable and no input is accepted there.
on the Network Configurator causes theXML encoding looks for an XML declaration in the message to determine the encoding dynamically. Therefore, a message that starts with this uses Big5 encoding: <?xml version="1.0" encoding="BIG5" ?>
XML encoding determination is used both for inbound and outbound messages.
Note that
is not selected and messages without an XML declaration are assumed to be UTF-8. Therefore, an inbound message that starts with this uses UTF-8 encoding because the byte order mark is ignored.The message must start with an XML declaration for it to be recognized.
If
had been selected for the previous example, then the leading FE FF would cause this to correctly use UTF-16 Big Endian encoding.This shows that an XML declaration might not be the most reliable indicator of encoding. An XML message may undergo encoding conversions for storage or transport with the XML declaration being changed. In this case, the byte order mark is considered more reliable than the XML declaration. The XML declaration (BIG5) would be considered the original encoding when the current encoding is UTF-16BE.