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 API Support » Problem with Mesage size!!!

Post new topic  Reply to topic
 Problem with Mesage size!!! « View previous topic :: View next topic » 
Author Message
ybrahim1903
PostPosted: Mon May 28, 2007 6:55 am    Post subject: Problem with Mesage size!!! Reply with quote

Newbie

Joined: 28 May 2007
Posts: 2

I'm have a problem with IBM.WMQ.MQMessage when i use the WriteString method because when i write a string of 32 characters or any length, the method convert the message to double size.

For example:

str = "hello"
MQMessage mqMsg = new MQMessage();
mqMsg.WriteString(str);

the length of str is 5 characters but when i refer to MessageLength it's show 10...

the method duplicate the length of the string!!

I need help with this problem!!! it's Urgent!!!
Back to top
View user's profile Send private message MSN Messenger
fjb_saper
PostPosted: Mon May 28, 2007 8:11 am    Post subject: Reply with quote

Grand High Poobah

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

Looks like you are using .NET.
.Net stores the string in UNICODE i.e. UTF-16 or CCSID 1200.
Each char is represented by 2 bytes.

Nothing to worry about.
Working as designed....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ybrahim1903
PostPosted: Mon May 28, 2007 9:52 am    Post subject: Reply with quote

Newbie

Joined: 28 May 2007
Posts: 2

Thanks for your help!!! Exist another way to do that? (better)
Back to top
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Mon May 28, 2007 10:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ybrahim1903 wrote:
Thanks for your help!!! Exist another way to do that? (better)


AFAIK .NET insists on Unicode. It's not a problem as long as whoever's reading the message specifies convert on the get.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 API Support » Problem with Mesage size!!!
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.