Author |
Message
|
jindosyrie |
Posted: Mon Feb 02, 2009 2:11 pm Post subject: Message Broker 6 can't handle XML file encoded in Uni utf16 |
|
|
Newbie
Joined: 02 Feb 2009 Posts: 3
|
I have a message flow which consists of a FileInput node, XML Transformer, JavaCompute Node, and a FileOutput node. This flow is to take a xml file, transform it and then create another xml file, both xmls are validated using schema.
When I passed in an XML file encoded in utf-16 in the flow, I got the following error when it passes through the xml transformer
[Fatal Error] <xml name>:1:1: Content is not allowed in prolog.
The XSLT debugger could not parse the XML document <xml name>
All xml have this <?xml version="1.0" encoding="UTF-16"?>
If I encode all xml.s with <?xml version="1.0" encoding="ISO-8859-1"?> then it works fine.
Does anyone have any idea?
Thanks in advance.
Last edited by jindosyrie on Tue Feb 03, 2009 7:08 am; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 02, 2009 2:39 pm Post subject: Re: Message Broker 6 can't handle XML file encoded in Uni ut |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jindosyrie wrote: |
All xml have this <?xml version="1.0" encoding="UTF-16"?>
If I change all xml.s to this <?xml version="1.0" encoding="ISO-8859-1"?> then it works fine.
|
How are these the same? ISO-8859-1 is standard issue Latin-1 (as defined here) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 02, 2009 3:03 pm Post subject: Re: Message Broker 6 can't handle XML file encoded in Uni ut |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
jindosyrie wrote: |
All xml have this <?xml version="1.0" encoding="UTF-16"?>
If I change all xml.s to this <?xml version="1.0" encoding="ISO-8859-1"?> then it works fine.
|
How are these the same? ISO-8859-1 is standard issue Latin-1 (as defined here) |
Is the content of the files really different? As a hint the UTF-16 encoded file should be about twice the size of the ISO-8859-1 encoded one.
You cannot just switch the header and expect it to work...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jindosyrie |
Posted: Tue Feb 03, 2009 7:01 am Post subject: |
|
|
Newbie
Joined: 02 Feb 2009 Posts: 3
|
I'm sorry. I meant to say that that if I encode the xml in ISO then the workflow works fine. (not just changing the header).
Yes. file encoded in utf-16 is double size of that in ISO (the content is the same).
Last edited by jindosyrie on Tue Feb 03, 2009 7:10 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 03, 2009 7:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What is the CCSID property of the FileInput node? |
|
Back to top |
|
 |
jindosyrie |
Posted: Tue Feb 03, 2009 7:22 am Post subject: |
|
|
Newbie
Joined: 02 Feb 2009 Posts: 3
|
I used the Broker System Default.
then changed to 1200 and 1202, but none works |
|
Back to top |
|
 |
|