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 » IBM MQ Java / JMS » Multi-byte character indicator

Post new topic  Reply to topic
 Multi-byte character indicator « View previous topic :: View next topic » 
Author Message
ctsaltaf
PostPosted: Fri Feb 17, 2006 3:24 am    Post subject: Multi-byte character indicator Reply with quote

Newbie

Joined: 27 Mar 2005
Posts: 7

Hi,
I am raising this query on behalf of my team member
We are having a unique problem in which using JMS we are sending message with UTF-8 encoding and at receivers end the messages are arriving okay but they have got two bytes at the begining of each messages which i feel is multi-byte character indicator since some of those special UTF-8 characters are represented by 2 bytes.

We are pumping out bytes from JMS and when we pump out in bytes only then those two extra bytes are coming else when we pump out as string, then receiving application does not like the way those special UTF-8 characters appear at their end.

Any one know how to solve this. Receiving application is MQSI application so we have a limitation in terms of receiving application cannot change.

We somehow needs to send the message with bytes pumping and without the two extra bytes which appear to be multi-byte character indicator on the beginging of message. Messages are send with RFH2 headers.

Please let us know your thoughts on this.

Regards
Altaf
Back to top
View user's profile Send private message
fschofer
PostPosted: Fri Feb 17, 2006 3:45 am    Post subject: Reply with quote

Knight

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

Hi,

please post a hexdump of you message using amqsbcg

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Feb 17, 2006 4:57 am    Post subject: Reply with quote

Grand High Poobah

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

You do not need to use a UTF-8 message to talk to the broker(mqsi).
Just use a plain text message. The broker can translate from which ever CCSID you are sending (if you have extra translation tables you need to make them available to the broker).

You could just as well model the message payload for the broker...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ctsaltaf
PostPosted: Sun Feb 19, 2006 9:24 pm    Post subject: Multi-byte character indicator Reply with quote

Newbie

Joined: 27 Mar 2005
Posts: 7

Thanks guys for all your responses.

Doing a bit of reserch we came to a conclusion that somehow we need to send the message in form of bytes without those two extra characters.

We have thought of a logic like

1) Read the file into a string
2) Convert the string into UTF-8 encoded (I am not sure of which method I can use to do that)
3) Send that encoded string in form of bytes on queue (without writeUTF method) ( may be use writeBytes)

Can you please suggest us if anyone can tell us what is the method which we can use to convert the string in UTF-8 encoded.

Thanks and regards
Altaf
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 20, 2006 6:03 am    Post subject: Reply with quote

Grand High Poobah

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

The real question here is why do you need to convert to UTF-8 ?

As said the broker can handle any CCSID conversion, given the tables (which means all standard conversions are handled).

What does your application do ?

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
EddieA
PostPosted: Mon Feb 20, 2006 9:17 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
but they have got two bytes at the begining of each messages which i feel is multi-byte character indicator

No. That's the length of the data. It's there because you used writeUTF() (which has nothing at all to do with UTF-8) instead of writeString.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » IBM MQ Java / JMS » Multi-byte character indicator
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.