XML declarations that BizTalk Server generates do not match the file encoding (816068)



The information in this article applies to:

  • Microsoft BizTalk Server 2002

SYMPTOMS

If you set Microsoft BizTalk Mapper to generate an XML declaration in the outbound document, the document may be encoded as UTF-8, although the XML declaration indicates that the document is encoded as UTF-16.

CAUSE

When BizTalk Mapper generates the outbound document, the data is encoded as UTF-16. However, the encoding of the document may change, depending on the transport that is used in the messaging port. The XML declaration is not updated after the mapping stage. Therefore, the declaration still indicates that the document is encoded as UTF-16.

RESOLUTION

If your output document must be encoded in a specific format, you must process the data outside Microsoft BizTalk Server to use a specific encoding scheme.

The BizTalk Server online documentation includes a Microsoft Visual Basic Scripting Edition (VBScript) sample that illustrates how to change the encoding of a document. For more information, visit the following Microsoft Web site:

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the behavior

  1. Use BizTalk Mapper to create a new map between two document specifications. On the Tools menu, click Options. On the XSLT Output tab, set the Omit XML declaration option to no.
  2. Create a new messaging port and a new channel by using the map that you created in step 1. Select file transport for the port.
  3. Submit a document to the channel. When an output file is generated, notice that it is encoded as UTF-8.

Modification Type:MinorLast Reviewed:2/4/2004
Keywords:kbprb KB816068 kbAudDeveloper