Author |
Message
|
vaxpeda |
Posted: Fri Aug 26, 2011 12:47 am Post subject: Can SUB character be changed |
|
|
Newbie
Joined: 26 Aug 2011 Posts: 2
|
When receiving messages in MQ and a conversion between two codepages can't be done then MQ puts the SUB character in the received message instead. Can the SUB character be changed to another character ? |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Aug 26, 2011 12:56 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
IMHO ... if MQ is not able to perform a conversion during a MQGET - CONVERT, then you will receive the message unconverted with a proper condition and reason code.
It is then up to you (or the application program) to react properly. _________________ Regards, Butcher |
|
Back to top |
|
 |
vaxpeda |
Posted: Fri Aug 26, 2011 1:34 am Post subject: SUB character, conversion can't be done for a specific char |
|
|
Newbie
Joined: 26 Aug 2011 Posts: 2
|
Mr Butcher wrote: |
IMHO ... if MQ is not able to perform a conversion during a MQGET - CONVERT, then you will receive the message unconverted with a proper condition and reason code.
It is then up to you (or the application program) to react properly. |
Yes this would be true if MQ doesn't have a translation table to use.
If for example we put in an mq message with ccsid 912 (ISO8859-2) and then try to get it with ccsid 819 (ISO8859-1) then there will be error 2119 (0847): MQRC_NOT_CONVERTED
but if we instead have an mq message in UTF-8 and put this into MQ and then try to get it with ccsid 819 then we will get the message but all characters that can't be translated will be SUB character. And this is because there is a conversion table between UTF-8 and ISO8859-2 |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Aug 26, 2011 2:23 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
ok, i understand. but cant help, no experience in that area. _________________ Regards, Butcher |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Aug 26, 2011 9:22 am Post subject: Re: Can SUB character be changed? |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
vaxpeda wrote: |
When receiving messages in MQ and a conversion between two codepages can't be done then MQ puts the SUB character in the received message instead. Can the SUB character be changed to another character ? |
That's what the SUB character is for: substitution.
It is possible to modify the conversion table, or create a new one, but it's neither trivial, nor recommended. The details vary, depending on the platform.
It would be much easier to post-process the message after conversion, replacing SUB characters with some other character. |
|
Back to top |
|
 |
gbaddeley |
Posted: Fri Aug 26, 2011 1:35 pm Post subject: Re: Can SUB character be changed? |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
rekarm01 wrote: |
vaxpeda wrote: |
When receiving messages in MQ and a conversion between two codepages can't be done then MQ puts the SUB character in the received message instead. Can the SUB character be changed to another character ? |
That's what the SUB character is for: substitution.
It is possible to modify the conversion table, or create a new one, but it's neither trivial, nor recommended. The details vary, depending on the platform.
It would be much easier to post-process the message after conversion, replacing SUB characters with some other character. |
That's exactly how I was going to respond  _________________ Glenn |
|
Back to top |
|
 |
|