none
UTF-08 XSD gets converted to UTF-16 in Visual studio RRS feed

  • Question

  • Hello,

    We received a XSD with UTF-8 encoding, when i open it in notepad++ i see the frist line is:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    Then i import the XSD to visual studio and check it and see that the encoding changed to UTF-16:

    <?xml version="1.0" encoding="utf-16" ?>

    I used this XSD in a mapping, but now we have a problem in the outgoing file. It gets rejected cause of a character which isnt correct for UTF-8:

    <customer>Société</customer>

    How can i change the encoding in biztalk or visual studio to prevent this issue?

    Thursday, May 30, 2013 12:41 PM

Answers

  • Hi Ronald, you can solve this issue by using custom pipeline , Please refer given below link

    http://www.biztalkgurus.com/biztalk_server/biztalk_2006/f/10/t/2239.aspx

    Thanks,

    Chandra Kumar


    Thursday, May 30, 2013 1:01 PM

All replies

  • Hi Ronald, you can solve this issue by using custom pipeline , Please refer given below link

    http://www.biztalkgurus.com/biztalk_server/biztalk_2006/f/10/t/2239.aspx

    Thanks,

    Chandra Kumar


    Thursday, May 30, 2013 1:01 PM
  • First of all, the encoding of the actual Schema (.xsd file) has nothing to do with what encoding your output XML will eventually get. 

    Also all characters that are valid in UTF-16 are also valid in UTF-8, so I would suspect that the rejection is caused by something else. 

    Can you show the full XML output, and also specify what the file is saved as (UTF-8, ANSI, UNICODE??)

    Morten la Cour

    Thursday, May 30, 2013 1:21 PM
  • Visual Studio and BizTalk always use UTF-16 encoding for their schemas.

    Option 1: In orchestration

    outMessage(XMLNorm.TargetCharset) = "UTF-8";

    Option2: using a custom pipeline like this..

    http://winterdom.com/2006/01/fixmessageencodingcustompipelinecomponentsample


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Thursday, May 30, 2013 1:30 PM