ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Encoding Issue

Post new topic  Reply to topic
 Encoding Issue « View previous topic :: View next topic » 
Author Message
veeru_hyd
PostPosted: Tue Jan 04, 2011 9:59 pm    Post subject: Encoding Issue Reply with quote

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
View user's profile Send private message
MizukiYamato
PostPosted: Tue Jan 04, 2011 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Jan 04, 2011 10:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
veeru_hyd
PostPosted: Tue Jan 04, 2011 10:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
veeru_hyd
PostPosted: Tue Jan 04, 2011 10:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
veeru_hyd
PostPosted: Tue Jan 04, 2011 11:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
MizukiYamato
PostPosted: Tue Jan 04, 2011 11:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
veeru_hyd
PostPosted: Tue Jan 04, 2011 11:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
rekarm01
PostPosted: Wed Jan 05, 2011 1:13 am    Post subject: Re: CCSID issue Reply with quote

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
View user's profile Send private message
veeru_hyd
PostPosted: Wed Jan 05, 2011 1:43 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Wed Jan 05, 2011 1:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Encoding Issue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.