|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to support both 273 and 546 encoding in .Net API app? |
« View previous topic :: View next topic » |
Author |
Message
|
lifeng |
Posted: Fri Apr 11, 2008 6:49 am Post subject: How to support both 273 and 546 encoding in .Net API app? |
|
|
Apprentice
Joined: 11 Jan 2008 Posts: 46
|
Hi,
I am working on a project that converts from UNIX to Windows/.Net API and I have successfully made the app working under 273 encoding. One problem we just discovered during our testing however, is that in our UNIX system the app supports both encoding 273 and 546. In other words, if I have two messages with the same contents but one with encoding 273 and the other with 546, the UNIX based system can reads and process them equally well. But for our .Net based app, it will break when processing a 546 encoding.
I am using "mqMsg->set_CharacterSet(CCSID_437);" in my code to set the encoding. Maybe I should use something else instead? I tried quite a few but still doesn't solve my problem.
Here are the two type of messages that I am testing with:
Differences: Format Encoding
The one that works MQSTR 546
The one doesn't works <blank> 273
If anybody could point me to the right direction it will be highly appreciated!
Lifeng |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 11, 2008 7:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't set the CCSID.
Set Convert on the GET. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 11, 2008 2:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
lifeng wrote: |
Differences: Format Encoding
The one that works MQSTR 546
The one doesn't works <blank> 273
|
Get with convert will not solve this one.
You need to determine the content type of the message that does not work.
If it is text you need to request the sender to set the format to MQFMT_STRING.
This will allow a get with convert to work.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
lifeng |
Posted: Sat Apr 12, 2008 6:35 pm Post subject: |
|
|
Apprentice
Joined: 11 Jan 2008 Posts: 46
|
The content is always text. But I don't think I can change the sender's function. Like I mentioned before, I am converting an existing UNIX based system and that old program can handle both of these two formats. That makes me think that I should be able to do the same with Windows/.Net API as well.
As far as Get with Convert, I am still trying but haven't found the way to make it work. If anyone has this problem before and knows how to solve it, please advise!
Thanks
Lifeng |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Apr 12, 2008 7:56 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
lifeng wrote: |
The content is always text. But I don't think I can change the sender's function. Like I mentioned before, I am converting an existing UNIX based system and that old program can handle both of these two formats. That makes me think that I should be able to do the same with Windows/.Net API as well.
As far as Get with Convert, I am still trying but haven't found the way to make it work. If anyone has this problem before and knows how to solve it, please advise!
Thanks
Lifeng |
So you have a system that can handle properly both formats?
What is the CCSID of that system 273??
In order for this to work reliably independantly of the CCSID of the receiving system you need:
Set the msg format to MQFMT_STRING
Make sure there is a conversion table between the sending and receiving CCSID....
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|