In BizTalk Server 2004, when you add the Flat File Disassembler component to a receive pipeline, there is no apparent way to tell the disassembler what the encoding of the incoming files will be.

This is not very obvious but, as it turns out, there is a way to do this by changing the input document schema itself. The trick is setting the Codepage property of the node, which appears once you enable the Flat File Extensions on the schema editor.

According to the BizTalk documentation, the following algorithm is used to determine encoding when reading the document:

  1. If the "Charset" in the body part is set, use it.
  2. Otherwise, if the envelope (or document) schema specifies a code page, use it.
  3. Otherwise, if a byte order mark is present, use it.
  4. Otherwise, assume UTF-8.

Tomas Restrepo

Software developer located in Colombia.