Author |
Message
|
sudeepd2005 |
Posted: Tue Mar 04, 2014 1:58 pm Post subject: WMB SAP Adapter not able to handle special character |
|
|
Novice
Joined: 28 Oct 2013 Posts: 22
|
I am working on MB Adapter to receive and send idocs to SAP UK system.
I am observing "unconvertible character" error on some of the idocs and code page 819 is not able to handle the same. I have around 26 Languages to be supported and when I checked online 819 doesn't supports 10 of them and partially supports 5
I would highly appreciate if some one can help me out quickly on this .
Last edited by sudeepd2005 on Thu Mar 06, 2014 3:40 am; edited 1 time in total |
|
Back to top |
|
 |
Gralgrathor |
Posted: Tue Mar 04, 2014 2:15 pm Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Really? So what about 1208 or 1252? _________________ A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Mar 05, 2014 12:23 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you really have to handle all those languages then the only realistic way to go is to use CCSID 1208.
There are variants of the ISO-8859 standard that will cover some of the European languages BUT Cyrillic (Russian and Ukrainaian) and others including Thai and Hebrew are outside the ISO-8859 standard so UTF-8 is the way to go. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 05, 2014 3:33 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I agree with smdavies99. Who says that you have to use code page 819 when writing these IDocs? _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
sudeepd2005 |
Posted: Wed Mar 05, 2014 3:39 am Post subject: |
|
|
Novice
Joined: 28 Oct 2013 Posts: 22
|
I have tried with 1208 but the failures observed are more than 819.
I searched a lot over internet but didnt find any CCSID to handle all this.
Any idea how this can be handled at the code level ?
Last edited by sudeepd2005 on Thu Mar 06, 2014 3:41 am; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 05, 2014 5:33 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You are confused. Stop 'trying things'.
CCSID 1208 is UTF-8. UTF-8 can represent any Unicode character. The errors that you are getting are caused by mistakes in your code.
This line:
Code: |
DECLARE u1208 CHAR CAST(InputRoot.DataObject.*[1].IDocStreamData AS CHAR CCSID 1208); |
assumes that IDocStreamData is a BLOB that contains UTF-8 characters. It will convert those characters to a CHARACTER field that contain UTF-16 characters ( because all CHARACTER data in the message tree is UTF-16 ).
This line:
Code: |
DECLARE uBLOB1208 BLOB CAST(InputRoot.DataObject.*[1].IDocStreamData AS BLOB CCSID 1208); |
assumes that IdocStreamData is a CHARACTER field ( so UTF-16 ) in the message tree. It will convert those characters to a BLOB that contains UTF-8 characters.
Don't try to fix your code until you understand all of that. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
sudeepd2005 |
Posted: Wed Mar 05, 2014 7:47 am Post subject: |
|
|
Novice
Joined: 28 Oct 2013 Posts: 22
|
Thanks Kimbert for the detailed explanation of code.
Last edited by sudeepd2005 on Thu Mar 06, 2014 3:42 am; edited 1 time in total |
|
Back to top |
|
 |
Gralgrathor |
Posted: Wed Mar 05, 2014 8:05 am Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Ouch, my eyes!
Sudeep, I don't think you're going to get any instant fixes to submitted code here (by the way, ==> [ c o d e ] tags are very nice for you).
You're best helped by learning to *understand* the problem before trying to fix the code. Otherwise you will be writing code from an incomplete or simply wrong understanding, this will mess up your source and produce unpredictable results and make everybody really angry.
So first you'll have to figure out what the format of the incoming stream is, and what that means - in terms of code page and encoding, or CCSID. _________________ A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine. |
|
Back to top |
|
 |
sudeepd2005 |
Posted: Wed Mar 05, 2014 10:28 am Post subject: |
|
|
Novice
Joined: 28 Oct 2013 Posts: 22
|
Can some one please help me here...I am in urgent need of fixing the code..
 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 05, 2014 10:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sudeepd2005 wrote: |
Can some one please help me here...I am in urgent need of fixing the code.. |
We are helping, though you're not helping us by not formating your posts.
The problem is that the advice you're getting is not what you expect to hear. Which is a shame because it's good advice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sudeepd2005 |
Posted: Thu Mar 06, 2014 3:44 am Post subject: |
|
|
Novice
Joined: 28 Oct 2013 Posts: 22
|
Does the CCSID information comes in the idoc data ?
I converted the Hex data to string and checked but can't find any thing over there. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 06, 2014 3:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sudeepd2005 wrote: |
Does the CCSID information comes in the idoc data ?
I converted the Hex data to string and checked but can't find any thing over there. |
Check InputRoot.Properties!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|