Author |
Message
|
veeru_hyd |
Posted: Tue Jan 04, 2011 9:59 pm Post subject: Encoding Issue |
|
|
Novice
Joined: 28 Oct 2010 Posts: 23
|
Hi,
Here i am facing an ENCODING issue, while recieving the request from WPG through MQinput. We are getting the message below.
þÿ * A C K 0 0 0 0 0 1 0 0 0 0 0 0 0 7 5 1 0 1 1 1 7 0 0 0 0 0 1
Actual message should be like this.
*ACK 000001000000075 101117000001
I am finding junk charecters and spaces in between the each charecter.
could you please let me know, how to proceed to resolve this issue.
If this is the encoding issue. how to encode into the UTF-16 in WMB.
Thanks,
Veera |
|
Back to top |
|
 |
MizukiYamato |
Posted: Tue Jan 04, 2011 10:15 pm Post subject: |
|
|
 Apprentice
Joined: 16 Dec 2009 Posts: 45 Location: Japan
|
Maybe,It is not wrong at UTF-16.
The junk character maybe be BOM(BOM is not character). |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jan 04, 2011 10:23 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
What CCSID is the Message Sent in (get this from the MQMD)
Can we see a hex dump of the message before it gets processed by Broker?
Stop the flow and browse the Queue with RFHUTIL.
The usual cause of these sorts of problems is that the message is sent with the wrong CCSID. ie, the CCSID in the MQMD does not match that of the data itself. _________________ 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 |
|
 |
veeru_hyd |
Posted: Tue Jan 04, 2011 10:36 pm Post subject: |
|
|
Novice
Joined: 28 Oct 2010 Posts: 23
|
I have stopped the flow and extracted the values. these are the values MB is getting.
This is the HEX DUMP ..
OutputRoot.Properties.CodedCharSetId = 1208;
OutputRoot.MQMD.Properties.CodedCharSetId= 819;
00000000 FEFF25A0 00A00000 002A0000 00410000
00000016 00430000 004B0000 00200000 00200000
00000032 00200000 00200000 00300000 00300000
00000048 00300000 00300000 00300000 00310000
00000064 00300000 00300000 00300000 00300000
00000080 00300000 00300000 00300000 00370000
00000096 00350000 00200000 00200000 00200000
00000112 00200000 00200000 00200000 00200000
00000128 00310000 00300000 00310000 00310000
00000144 00310000 00370000 00300000 00300000
00000160 00300000 00300000 00300000 00310000
00000176 00200000 00200000 00200000 00200000
00000192 00200000 00200000 00200000 00200000
00000208 00200000 00200000 00200000 00200000
00000224 00200000 00200000 00200000 00200000
00000240 00200000 00200000 00200000 00200000
00000256 00200000 00200000 00200000 00200000
00000272 00200000 00200000 00200000 00200000
00000288 00200000 00200000 00200000 00200000
00000304 00200000 00200000 00200000 00200000
00000320 00200000 00200000 00200000 00200000
00000336 00200000 00200000 00200000 00200000
00000352 000A
Thanks,
veera |
|
Back to top |
|
 |
veeru_hyd |
Posted: Tue Jan 04, 2011 10:57 pm Post subject: |
|
|
Novice
Joined: 28 Oct 2010 Posts: 23
|
Here my transaction is expecting the UTF-16, which ccid we should use?. Should we use that in MQMD or properties?. Could you please do needful.
Thanks,
Veera |
|
Back to top |
|
 |
veeru_hyd |
Posted: Tue Jan 04, 2011 11:34 pm Post subject: |
|
|
Novice
Joined: 28 Oct 2010 Posts: 23
|
smdavies99 wrote: |
What CCSID is the Message Sent in (get this from the MQMD)
Can we see a hex dump of the message before it gets processed by Broker?
Stop the flow and browse the Queue with RFHUTIL.
The usual cause of these sorts of problems is that the message is sent with the wrong CCSID. ie, the CCSID in the MQMD does not match that of the data itself. |
I have hard coded the CCSID as 1200 in MB flow after receiving. Still it is giving the junk charecters.
Thanks,
Veera |
|
Back to top |
|
 |
MizukiYamato |
Posted: Tue Jan 04, 2011 11:39 pm Post subject: |
|
|
 Apprentice
Joined: 16 Dec 2009 Posts: 45 Location: Japan
|
FEFF is BOM of UTF-8.
CCSID of UTF-16 is 1200.
1208 is CCSID of UTF-8.
(BOM:Byte Order Mark) |
|
Back to top |
|
 |
veeru_hyd |
Posted: Tue Jan 04, 2011 11:53 pm Post subject: |
|
|
Novice
Joined: 28 Oct 2010 Posts: 23
|
MizukiYamato wrote: |
FEFF is BOM of UTF-8.
CCSID of UTF-16 is 1200.
1208 is CCSID of UTF-8.
(BOM:Byte Order Mark) |
Hi,
I have tried couple of options to conver the UTF-8 to UTF-16.
Option1:
SET Environment.Variable.Data = CAST(InputRoot.BLOB.BLOB AS BLOB CCSID 1200);
Option2;
SET OutputRoot.Properties.CodedCharSetId = 1200;
Option 3:
SET OutputRoot.MQMD.CodedCharSetId= 1201;
It is still giving the junk values.
Am i missing any thing else in these approaches.
Thanks,
veera |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Jan 05, 2011 1:13 am Post subject: Re: CCSID issue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
The message flow gets an input message from the input queue, and puts an output message on an output queue.
The sending application needs to make sure that the input ccsid matches the input message body.
The message flow needs to make sure that the output ccsid matches the output message body.
The message flow can't fix a bad input message. Examine the message before it reaches the MQInput node:ccsid=1200: UTF-16 BE
ccsid=1202: UTF-16 LE
ccsid=1204: UTF-16 with BOM
ccsid=1208: UTF-8 |
|
Back to top |
|
 |
veeru_hyd |
Posted: Wed Jan 05, 2011 1:43 am Post subject: |
|
|
Novice
Joined: 28 Oct 2010 Posts: 23
|
Oh! ok i got it now. Thank you very much for all of your valuable responses. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jan 05, 2011 1:45 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
smdavies99 wrote: |
Stop the flow and browse the Queue with RFHUTIL.
The usual cause of these sorts of problems is that the message is sent with the wrong CCSID. ie, the CCSID in the MQMD does not match that of the data itself. |
Have you done this yet?
As has been mentioned, the most common explanation is thatthe MQMD CCSID does not match the CCSID of the actual data.
And has been mentioned Broker can't fix a bad message. _________________ 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 |
|
 |
|