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 IndexWebSphere Message Broker (ACE) SupportUnicode conversion

Post new topicReply to topic
Unicode conversion View previous topic :: View next topic
Author Message
dk27
PostPosted: Tue Jul 07, 2009 3:54 am Post subject: Unicode conversion Reply with quote

Acolyte

Joined: 28 Apr 2008
Posts: 51

I have a notepad saved encoding as unicode. It contains XML with come unicode characters. When I pass that file to broker through MQ. XML processing is failing.

To investigate, I stopped the flow and read the message through rfhutil and it seems that some special characters are appearing before the payload.

How can I remove these characters?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 07, 2009 3:57 am Post subject: Re: Unicode conversion Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dk27 wrote:
I have a notepad saved encoding as unicode. It contains XML with come unicode characters. When I pass that file to broker through MQ. XML processing is failing.

To investigate, I stopped the flow and read the message through rfhutil and it seems that some special characters are appearing before the payload.

How can I remove these characters?

There was a discussion on the forum about CCSID that you might want to refer to. Some CCSIDs have endianness marked in the first 2 bytes of the message payload. Generally speaking you could probably use the readUTF method for those messages. Don't remove the bytes, have the sender specify the correct CCSID in the header! Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dk27
PostPosted: Tue Jul 07, 2009 5:03 am Post subject: Reply with quote

Acolyte

Joined: 28 Apr 2008
Posts: 51

I have mentioned correct ccsid in MQRFH2 - CCSID field as 1200 for unicode (UTF-16) also set conversion on channel to "Yes" and sent a message but it still fails in the message broker.

XML looks something like this:

<employee>
<name>9451$%ÁÄÈ</name>
<id>xyz793</id>
<project>gaa</project>
</employee>

So some special characters coming in the message. and because of that it is failing, how can I identify those and remove these if possible.
Back to top
View user's profile Send private message
fschofer
PostPosted: Tue Jul 07, 2009 5:17 am Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

From ih03 docu:
Quote:
The code page field and the RFH encoding radio buttons should be used to select the desired byte ordering of the binary fields in the data that immediately follows the Rules and Formatting header.
The CCSID field is only used for a Rules and Formatting header that is in a version 2 format. This field denotes the code page used for the variable portion of the Rules and Formatting header.


So within rfhutil you have to set the code page on the RFH tab if you are using a RFH header or the code page on the MQMD tab if not.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
dk27
PostPosted: Tue Jul 07, 2009 8:49 am Post subject: Reply with quote

Acolyte

Joined: 28 Apr 2008
Posts: 51

This what I did and it is still failing...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 07, 2009 12:55 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dk27 wrote:
This what I did and it is still failing...
Channel conversion should be set to NO! not yes.
And obviously you do not have the right ccsid if your message has an endianness indicator as the first 2 bytes.

1208 ccsid does not have that indicator....


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Wed Jul 08, 2009 12:45 am Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I assume that you have already done the basic diagnostic steps:
1. disconnect the debugger
2. Insert Trace nodes
3. take a user trace

2. might not be useful in this particular case, but 1. and 3. are strongly advised whenever you get a non-trivial problem in your message flow.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportUnicode conversion
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.