|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ WriteString in mutibytes |
« View previous topic :: View next topic » |
Author |
Message
|
kyl |
Posted: Wed Feb 25, 2004 10:50 am Post subject: MQ WriteString in mutibytes |
|
|
Newbie
Joined: 25 Feb 2004 Posts: 8
|
Hi
Is there an option can be set in .NET MQMessage WriteString()
write a regular string "1234567890" , length 10 bytes, in single bytes
instead of unicode like this "1\02\03\04\05\06\07\08\09\00\0"
length 20 bytes.
Thanks |
|
Back to top |
|
 |
vennela |
Posted: Wed Feb 25, 2004 11:12 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
There are mny methods to write a message.
These are a few of the many
Code: |
public void Write(byte[] b, int off, int len)
public void WriteBytes(String s)
public void WriteString(String str) |
You should look at the Using .NET manual chapter 5 for the classes and interfaces.
Using .NET Manual |
|
Back to top |
|
 |
brad_blackmon |
Posted: Thu Mar 04, 2004 7:28 pm Post subject: |
|
|
 Newbie
Joined: 04 Mar 2004 Posts: 4 Location: Washington, D.C.
|
Also, look at setting the MQMessage.CharacterSet property before you call the WriteString() method. If you do nothing, it seems to default to 1200, which writes the string to the queue in unicode. However, if you set the CharacterSet property to 437 before you call the WriteString() method, it will write the string to the queue in ASCII text.
Cheers!
--Brad |
|
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
|
|
|
|