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 IndexIBM MQ Java / JMSUnsupported encoding exception (characterSet = 437)

Post new topicReply to topic
Unsupported encoding exception (characterSet = 437) View previous topic :: View next topic
Author Message
dnaren
PostPosted: Sat Aug 11, 2001 12:22 am Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
kolban
PostPosted: Sat Aug 11, 2001 6:01 am Post subject: Reply with quote

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
View user's profile Send private message
dnaren
PostPosted: Sat Aug 11, 2001 1:51 pm Post subject: Reply with quote

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

MQSeries.net Forum IndexIBM MQ Java / JMSUnsupported encoding exception (characterSet = 437)
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.