Author |
Message
|
MQRocks |
Posted: Thu Jan 27, 2011 1:41 pm Post subject: How to handle copyright and registered symbols |
|
|
Newbie
Joined: 27 Jan 2011 Posts: 6
|
The input is XML which contains special charaters like copyright and trademark , when we get the XML in the queue those are converted as below.
© -- copyright.
® -- Registered.
The ouput file is an EBCDIC format. Please suggest how to handle these charaters. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 27, 2011 1:55 pm Post subject: Re: How to handle copyright and registered symbols |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MQRocks wrote: |
The ouput file is an EBCDIC format. Please suggest how to handle these charaters. |
Tell us what platform hosts the queue in which you see these characters, and what code page that platform is using.
Then identify what position in the EBCDIC code page maps to those 2 characters & you'd (in a non-WMQ sense) map from the non-EBCDIC to the EBCDIC.
Then tell us where you have WMQ conversion enabled & if you really mean "output file" or "output queue but the messages are put to a file". _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 27, 2011 2:17 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Also take a look at the many posts here that relate to CCSID's and special character handling.
Then learn the golden (aka Kimbert's) Rules.
Broker can't fix broken messages. Get the sender to sort out their problems first
Then
Don't rely on the default or as created CCSID of the underlying Queue Manager. Set the CCSID on the outgoing message to ensure that it can be read correctly at the other end.
I'm sure Kimbert himself will add Rule 3. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 27, 2011 3:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Not being Kimbert, but I'd still like to add one rule.
If you have multibyte CCSID as input make sure you use a multibyte CCSID as output or you will get unreadable converted chars into your output. (accident waiting to happen).
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
MQRocks |
Posted: Thu Jan 27, 2011 4:08 pm Post subject: |
|
|
Newbie
Joined: 27 Jan 2011 Posts: 6
|
Tell us what platform hosts the queue in which you see these characters, and what code page that platform is using.
The platform that hosts the queue is Unix and the code page is 1051.
Then identify what position in the EBCDIC code page maps to those 2 characters & you'd (in a non-WMQ sense) map from the non-EBCDIC to the EBCDIC.
How do i check this?
Then tell us where you have WMQ conversion enabled & if you really mean "output file" or "output queue but the messages are put to a file".
Where should I check for WMQ conversion? The messages are sent to the Output queue. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Jan 27, 2011 11:57 pm Post subject: Re: How to handle copyright and registered symbols |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Browsing utilities, such as sample program amqsbcg0, support pack IH03 - (rfhutil), or support pack MO71 - (WMQ GUI Admin tool), are useful for inspecting the message headers and data for character conversion problems. Alternatively, adding Trace nodes and running a usertrace is also useful.
The input ccsid needs to match the actual character encoding of the input message data. Otherwise, the message flow can't read the input message properly. If the input message data is UTF-8, then the input ccsid should be 1208.
The output ccsid specifies the desired character encoding of the output message data. The WMB parsers will automatically convert the output message, as long as both the input and output headers are correct.
MQRocks wrote: |
The platform that hosts the queue is Unix and the code page is 1051. |
Is that the qmgr ccsid? The character set for ccsid=1051 does not contain either copyright or registered trademark characters, so it's not suitable in either the input or output message headers.
MQRocks wrote: |
Where should I check for WMQ conversion? The messages are sent to the Output queue. |
The MQInput properties has a 'Convert' checkbox to enable WMQ conversion. It's best to leave it unchecked, and let the WMB parsers handle conversion instead. |
|
Back to top |
|
 |
MQRocks |
Posted: Fri Jan 28, 2011 7:16 am Post subject: |
|
|
Newbie
Joined: 27 Jan 2011 Posts: 6
|
Can you please tell me clearly how to fix the problem . The incoming message code page is 1051 and outgoing message code page is set to 37 , do these two need to match? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 28, 2011 7:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MQRocks wrote: |
do these two need to match? |
No, but they do need to be able to be converted one to the other or characters in one will not appear correctly in the other.
MQRocks wrote: |
Can you please tell me clearly how to fix the problem |
No, because we're not looking at what you're looking at. You've been told quite clearly how to determine the nature of the problem, and had an issue pointed out: that CCSID 1051 doesn't contain trademarks or copyright characters so can't hold them. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rekarm01 |
Posted: Sat Jan 29, 2011 7:07 pm Post subject: Re: How to handle copyright and registered symbols |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
MQRocks wrote: |
The incoming message code page is 1051 |
Based on what evidence?
MQRocks wrote: |
and outgoing message code page is set to 37 |
Based on what evidence?
MQRocks wrote: |
do these two need to match? |
No. But they do need to be able to represent all the characters in the input and output message, respectively.
MQRocks wrote: |
Can you please tell me clearly how to fix the problem. |
First, gather more information about the problem. Stop the message flow. Put a message on the input queue. Inspect the message headers and the message bytes. Find the bytes that should represent the characters in question, and confirm that they would actually map to the expected characters, using the given ccsid. If not, the problem occurs before the message flow. The message flow can't fix the message; the sender needs to fix it.
Otherwise, stop the receiving application, enable a usertrace, restart the message flow, and similarly inspect the message on the output queue. If there's a problem with the message, examine the usertrace to determine the source of the problem, and fix the message flow.
Otherwise, the problem occurs after the message flow. The receiver needs to fix it.
There are plenty of web sites that offer code page charts and other useful information, including the IBM globalization web site, the Unicode web site, and the ICU Project web site. |
|
Back to top |
|
 |
|