Answered by:
UTF-08 XSD gets converted to UTF-16 in Visual studio

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?
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
- Edited by Chandra Kumar Thursday, May 30, 2013 1:02 PM
- Proposed as answer by Chandra Kumar Thursday, May 30, 2013 1:02 PM
- Marked as answer by Pengzhen Song Thursday, June 6, 2013 9:29 AM
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
- Edited by Chandra Kumar Thursday, May 30, 2013 1:02 PM
- Proposed as answer by Chandra Kumar Thursday, May 30, 2013 1:02 PM
- Marked as answer by Pengzhen Song Thursday, June 6, 2013 9:29 AM
-
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
-
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.