|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
amqsbcg giving different output to Java |
« View previous topic :: View next topic » |
Author |
Message
|
crossland |
Posted: Fri Dec 10, 2004 6:17 am Post subject: amqsbcg giving different output to Java |
|
|
Master
Joined: 26 Jun 2001 Posts: 248
|
My java program is returning different results to amqsbcg for the same message on a queue.
To display the contents of the message, I am using the following:
msgString = message.readString(message.getDataLength());
The output of the message differs from that produced by amqsbcg for higher value characters. For example, amqsbcg returns DC3b where my program returns 25843b. My program is using Integer.toHexString to get these values.
The manual states that readString "reads a string in the codeset identified by the characterSet member variable, and convert it into Unicode."
It also states:
"The coded character set identifier of character data in the application message data. The behavior of the readString, readLine, and writeString methods is altered accordingly. The default value for this field is MQC.MQCCSI_Q_MGR."
Doesn't amqsbcg use the same logic to determine the CCSID? If this was the case, I'd expect amqsbcg and the Java program to be returning the same values.
Any suggestions would be very helpful.
Thanks,
Tim
http://www.solent-design.com/ |
|
Back to top |
|
 |
Nigelg |
Posted: Fri Dec 10, 2004 6:29 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
amqsbcg does not do data conversion, so the msg data appears as it is. The java app converts the data to Unicode, as you said above. |
|
Back to top |
|
 |
clindsey |
Posted: Fri Dec 10, 2004 7:59 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|