Author |
Message
|
Harsha_AS |
Posted: Wed May 27, 2015 11:15 pm Post subject: Handling IDOC double byte in IIB |
|
|
Apprentice
Joined: 04 Dec 2011 Posts: 26
|
We are getting the IDOC data from SAP in which they are sending UTF16 data.
In the IDOC data they are sendign double byte data as well. We are receiving these IDOC message through SAPINPUT node with Code page set 4102.
Once we receive IDOC message We have DFDL created (FixedLength) to parse this data.
Our flow is failing when we get the double byte data in IDOC message due to lenght missmatch.
In DFDL i have set the Encoding (code page) as <dynamically set>
Could you please let me know how to handle this double byte message in DFDL while parsing. |
|
Back to top |
|
 |
maurito |
Posted: Wed May 27, 2015 11:41 pm Post subject: Re: Handling IDOC double byte in IIB |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Harsha_AS wrote: |
We are getting the IDOC data from SAP in which they are sending UTF16 data.
In the IDOC data they are sendign double byte data as well. We are receiving these IDOC message through SAPINPUT node with Code page set 4102.
Once we receive IDOC message We have DFDL created (FixedLength) to parse this data.
Our flow is failing when we get the double byte data in IDOC message due to lenght missmatch.
In DFDL i have set the Encoding (code page) as <dynamically set>
Could you please let me know how to handle this double byte message in DFDL while parsing. |
in your DFDL model, have you set the Length Unit property to characters ? |
|
Back to top |
|
 |
Harsha_AS |
Posted: Thu May 28, 2015 1:03 am Post subject: |
|
|
Apprentice
Joined: 04 Dec 2011 Posts: 26
|
i Had the Length Unit Property has Bytes. I changed it to characters and tested it. But i am still getting thesame parse error. |
|
Back to top |
|
 |
maurito |
Posted: Thu May 28, 2015 1:07 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Harsha_AS wrote: |
i Had the Length Unit Property has Bytes. I changed it to characters and tested it. But i am still getting thesame parse error. |
you will need to supply more info if you want people to help. For example: the DFDL model, an example of the input data, the parser trace |
|
Back to top |
|
 |
Harsha_AS |
Posted: Thu May 28, 2015 2:00 am Post subject: |
|
|
Apprentice
Joined: 04 Dec 2011 Posts: 26
|
Below is the Hex data coming from SAP
0049004e0056004900450057002000440061007300680062006f00610072006400202013002000530069006e0067006c006500200055006e00690074002000280044004d0033003000300029
Below is the ASCII convertion
INVIEW Dashboard !! Single Unit (DM300)
You can see in the hex data there is a double byte "2013" which is converted in to ASCII "!!"
In my DFDL when it parsses this double byte "2013" it is converting it to ASCII "!!" where the actual value of double byte "2013" is "–"
Could you please let me know what encoding i need to use in DFDL to handle this scenario.
Or is it something else that i need to take care. |
|
Back to top |
|
 |
maurito |
Posted: Thu May 28, 2015 2:13 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Harsha_AS wrote: |
Below is the Hex data coming from SAP
0049004e0056004900450057002000440061007300680062006f00610072006400202013002000530069006e0067006c006500200055006e00690074002000280044004d0033003000300029
Below is the ASCII convertion
INVIEW Dashboard !! Single Unit (DM300)
You can see in the hex data there is a double byte "2013" which is converted in to ASCII "!!"
In my DFDL when it parsses this double byte "2013" it is converting it to ASCII "!!" where the actual value of double byte "2013" is "–"
Could you please let me know what encoding i need to use in DFDL to handle this scenario.
Or is it something else that i need to take care. |
Test parse your model using that message and pick the correct encoding. Have a guess at which one to use |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 28, 2015 5:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
U2013 in UTF-8 is N-DASH which looks like a - but has a different hex code.
Often a problem when copying from MS Word.
This is a punctuation character. It looks like a dash but is not and has a different hex value. I'd say your SAP system is not sending the right value (unlikely) or does not have the right value in it's source (more likely).
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|