2007年7月24日

[BizTalk]Change character encoding in BTS pipeline

To change character encoding in BizTalk pipeline, first we have to know how BizTalk determined the character encoding of an incoming/outgoing message.

BizTalk Server 2006 uses following rules to find out the encoding of a message:
  1. If Byte Order Mark exists, then the encoding is determined
  2. If content property BodyPart.CharSet is set, then the encoding is determined
  3. If xml declaration exists, then the encoding is determined
  4. If none of above matches, UTF-8 is used

So to change message encoding, here are several ways:

  1. Add byte order mark
  2. Set BodyPart.CharSet content property
  3. Add Xml declaration

So it is NOT enough if you only change the actual data in the stream to specificed encoding, one of the above must be matched!

沒有留言:

Blog Archive

About Me