locked
Unicode Encoding Issue in Biztalk RRS feed

  • Question

  • Hello Friends,

    I need help/guidance on encoding in Biztalk. I am trying to send Unicode Encoded Message to send port. I am successfully able to perform this using the below snippet in Execute method of custom pipeline:

    byte[] buffer = System.Text.UnicodeEncoding.Unicode.GetBytes(RegMsg);

    and  then writing the same to body part of outgoing message.

    But I do not want to maintain a custom pipeline only for doing this encoding and hence I tried setting the encoding params in Biztalk expression shape doing someting as:

    Msg_response(XMLNorm.TargetCharset)="unicode"/"UTF-8"/"UTF-16";

    But NO luck.

    Can you please guide me with suggestion on anything I am missing.

    Thanks,
    Harkirat

    Thursday, April 14, 2016 12:34 PM

All replies

  • What makes you think the data is not Unicode already?  In nearly all cases, it is by default.

    You have to really try to make it something like ASCII.

    Thursday, April 14, 2016 12:49 PM
    Moderator
  • Hi Arindam,

    The custom adapter which I am using expect Unicode. The message is traversed without error when I use pipeline using byte[] buffer = System.Text.UnicodeEncoding.Unicode.GetBytes(RegMsg);.

    But fails when I try Msg_response(XMLNorm.TargetCharset)="unicode"; in orchestration.

    I am doing it correctly in orchestration for the functionality I used in pipeline?

    Thanks,

    Harkirat

    Thursday, April 14, 2016 5:19 PM