Author |
Message
|
vasant_b |
Posted: Fri May 21, 2010 12:42 am Post subject: WMB CCSID 1208 Problem |
|
|
Newbie
Joined: 21 May 2010 Posts: 3
|
Hi,
In our project, the input message is in XML format. Some fields contain Chinese characters. My flow is as follows.
MQInput Node(uses XMLNSC domain) --> Compute Node (to audit and transform into TDS) -->MQJMSTransform Node-->JMS OutputNode.
Below is an example message
<Order>
<OrderItem>TV</OrderItem>
<OrderNo>123<OrderNo>
<OrderDesc>èf¢Ã</OrderDesc>
</Order>
1. When I use CCSID = 1208, the message is parsed only till OrderNo and later XML parsing error accours at OrderDesc tag.
2.If I use CCSID = 437, the message is processed successfully till Comput node but fails at MQJMSTranform Node with the exception Unconvertible character.
Kindly help me resolve this issue.
Thanks,
Vasant |
|
Back to top |
|
 |
zpat |
Posted: Fri May 21, 2010 1:09 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Ascii is not likely to work with these non-ASCII characters.
Unicode is better, but are you sure the actual data of the message is in Unicode?
Just setting the MQMD.CCSID to a particular value does not change the data. The value of the CCSID used must match the actual data code page used to create the data.
MQPUT does not convert data. |
|
Back to top |
|
 |
vasant_b |
Posted: Fri May 21, 2010 1:52 am Post subject: |
|
|
Newbie
Joined: 21 May 2010 Posts: 3
|
Hi,
I think the input message is Unicode. This is the format of the message.
<?xml version="1.0" encoding="UTF-8"?>
<Order>
<OrderItem>TV</OrderItem>
<OrderNo>123<OrderNo>
<OrderDesc>èf¢Ã</OrderDesc>
</Order>
The message flow inteface should be able support both english and chinese characters coming in the XML. But somehow the message is failing at the very first node.
Thanks,
Vasant |
|
Back to top |
|
 |
zpat |
Posted: Fri May 21, 2010 2:03 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The XML text does not actual prove that the data is formatted as Unicode.
You need to inspect the message data in hex with RFHUTILC (support pac IH03) or Support Pac MO71, or some other message browser/editor. |
|
Back to top |
|
 |
vasant_b |
Posted: Fri May 21, 2010 2:48 am Post subject: |
|
|
Newbie
Joined: 21 May 2010 Posts: 3
|
I tested if the XML message is unicoded by the following 3 ways.
1. I opened XML document in a note pad. I clicked on save as, to verify the encoding option. The encoding option in this case is set to Unicode.
2. I opened the XML document in the internet explorer and it opens properly showing all the characters including chinese characters.
3. Using RFHUtil, i viewed the data in hex format. It displays the hex characters properly. (Not sure if this is the right way of testing xml). |
|
Back to top |
|
 |
mvic |
Posted: Fri May 21, 2010 3:01 am Post subject: Re: WMB CCSID 1208 Problem |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
vasant_b wrote: |
XML parsing error accours at OrderDesc tag. |
If it's valid UTF-8 character data, and the parser fails to parse it, raise the problem with the owner of the parser. |
|
Back to top |
|
 |
zpat |
Posted: Fri May 21, 2010 4:30 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
vasant_b wrote: |
Using RFHUtil, i viewed the data in hex format. It displays the hex characters properly. (Not sure if this is the right way of testing xml). |
Everything will display as hex, that's the point. The thing to do is check that the actual contents of each byte are as expected.
If you don't know that your data should look like when represented in hex, then this test won't help you.
If you look up your code page somewhere, you should find a table of the hex representation for each printable character. |
|
Back to top |
|
 |
|