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 » Get MQ error problem

Post new topic  Reply to topic
 Get MQ error problem « View previous topic :: View next topic » 
Author Message
Kelvin
PostPosted: Tue Sep 19, 2006 12:09 am    Post subject: Get MQ error problem Reply with quote

Novice

Joined: 25 Aug 2006
Posts: 10
Location: Hong Kong

Hi all,

I use java to retrieve data from MQ using readFully function.

I saw sample code but I don't understand. Can anyone help me please?

byte[] buf = new byte[sendMessage.getDataLength()];

sendMessage.readFully(buf);

byte[] bytes = new String(buf, "CP933").getBytes("KSC5601");

//msgText = new String( bytes );
msgText = new String( bytes , "KSC5601" );


I read from Web to find a bit information. It is about Korea language conversion.

I have to read Simplify Chinese character, do anyone know how to do it?

Rgs

Kelvin Ho

kelvin.ho@cigna.com
kelvinho2000@yahoo.com
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Sep 19, 2006 2:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You would chage "KSC5601" to the value for Simplified Chinese.

I don't know what that value is.
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Tue Sep 19, 2006 3:12 am; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Sep 19, 2006 2:55 am    Post subject: Reply with quote

Grand High Poobah

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

Seems to be quite a complex way to deal with CCSID. I would have tried to let MQ handle it. Make sure the message is sent with format MQFMT_STRING (MQSTR) and use option with convert on the get....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Get MQ error problem
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.