|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unsupported encoding exception (characterSet = 437) |
« View previous topic :: View next topic » |
Author |
Message
|
dnaren |
Posted: Sat Aug 11, 2001 12:22 am Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
I am trying to post/get messages with 'characterSet' value 437 (corresponds to ibm437 / PC Original). I need this encoding because the messages posted by the C++ programs have this encoding/character set. (platform: Windows2000)
While posting the message, I am using the following code fragment:
Code: |
MQMessage msg =new MQMessage();
msg.characterSet = 437;
msg.writeString("sample message");
MQPutMessageOptions pmo =new MQPutMessageOptions();
queue.put(msg,pmo);
|
I get the following exception:
java.io.UnsupportedEncodingException: Cp437
When I try to GET the messages with this encoding/characterSet, the call MQMessage.readString(length) does nothing. I am using the following code fragment to GET the message:
Code: |
MQMessage msg =new MQMessage();
MQGetMessageOptions gmo =new MQGetMessageOptions();
queue.get(retrievedMessage,gmo);
msg.characterSet = 437;
int length = retrievedMessage.getMessageLength();
String outMsg = retrievedMessage.readString(length);
|
How do I deal with this encoding/characterSet differences? The documentation says, characterSet 437 is supported.
(platform: Windows2000)
[ This Message was edited by: dnaren on 2001-08-11 01:27 ] |
|
Back to top |
|
 |
kolban |
Posted: Sat Aug 11, 2001 6:01 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
An almost identical questions was previously posted and resulted in a fine discussion. Please review the following:
UnsupportedEncodingException and see if that helps. Please post back your results. |
|
Back to top |
|
 |
dnaren |
Posted: Sat Aug 11, 2001 1:51 pm Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
It's not a MQSeries problem! The required library to support the encoding (i18n.jar) was missing. It was not part of earlier standard JDK distributions from SUN MicroSystems. The only way to get it was to install the international version of Java Runtime Environment (JRE) which could be downloaded seperately from JDK.
Now the good news is SUN made i18n.jar available through standard distribution of JDK 1.3.1 (not the beta). If you have the latest JDK (ver. 1.3.1) installed, you will find i18n.jar under your X:jdk_install_dirjrelib drectory.
To simplify, find i18n.jar on your system and add it to CLASSPATH environment variable.
Thanks for the help! This is a great place for MQ people to hang out.
[ This Message was edited by: dnaren on 2001-08-11 14:54 ] |
|
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
|
|
|
|