Author |
Message
|
bharathkumar.g |
Posted: Fri May 13, 2016 4:52 am Post subject: MQ message containing Cyrillic characters is not working |
|
|
Newbie
Joined: 13 May 2016 Posts: 4
|
Sending Environment (mainframe, COBOL, EBCDIC) - This environment sends MQ message containing Cyrillic characters with CCSID=1208.
Receiving Environment (Solaris 10, MQ 7.0.1.9, JRE 1.7) - This environment reads MQ message containing Cyrillic characters with CCSID=1208, but getting MQException as follows while reading the MQ message:
2150 (0866) (RC2150): MQRC_DBCS_ERROR
An error was encountered attempting to convert a double-byte character set (DBCS) string
MQC.MQGMO_CONVERT is used while MQ GET.
Also, if the sending environment sends the MQ message with CCSID=1025 then the receiving environment reads the MQ message with CCSID=1208 and it is working fine.
The sending environment may send the MQ message with either CCSID=1208 OR 1025 and receiving environment should not get any problem while reading the MQ message.
Please Advice. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 13, 2016 4:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The sender should make absolutely sure that the CCSID on the message matches the content of the message.
If they send it with 1208, then the data in the message has to be in 1208 for conversion to work.
Likewise with CCSID 1025. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 13, 2016 5:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
The sender should make absolutely sure that the CCSID on the message matches the content of the message. |
This comment:
bharathkumar.g wrote: |
Sending Environment (mainframe, COBOL, EBCDIC) - This environment sends MQ message containing Cyrillic characters with CCSID=1208. |
contains 2 points of concern. Firstly, a normal EBCDIC environment doesn't support Cyrillic or other non-Latin characters. You'd need to explicitly invoke DCBS to do that. Secondly, simply setting the CCSID to 1208 does not "automagically" change the content of the message (or invoke DCBS).
So as my most worthy associate correctly says, make sure you've really got Cyrillic characters in the message (and not the 2 bytes that make them up coded in ECDIC). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 13, 2016 5:12 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Also, I think anything in 1208 is a "Unicode character", not a "Cyrillic" character...
Technically, at least. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 13, 2016 5:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Also, I think anything in 1208 is a "Unicode character", not a "Cyrillic" character...
Technically, at least. |
I think you're absolutely right.
So let's be completely clear (because I don't think I was):
1208 is a double byte Unicode code page. Unless you've got DCBS explicitly enabled that won't work, as you've discovered.
1025 is a single byte EBCDIIC non-Latin code page with Cyrillic support. If the sending application is using that, you'll get Cyrillic at the receiving end. If it's using one of the default Latin pages (e.g. 500) you'll get junk at the receiving end.
Both of these pages can be converted to 1208 by a receiving queue manager with a default CCSID of 1208, because in the first case it's already 1208 & in the second case any single byte code page can be converted to double byte.
The key point remains that the content of the message must be reflected by the CCSID selected. You can't create a single byte encoded message and send it as 1208, in the same way you can't create a DCBS message and send it as 1025. Both of those will fail to convert. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bharathkumar.g |
Posted: Fri May 13, 2016 6:32 am Post subject: |
|
|
Newbie
Joined: 13 May 2016 Posts: 4
|
I agree. CCSID 1208 is equivalent to UTF-8 (that includes Cyrillic characters).
Vitor - how to invoke/enable DCBS explicitly. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 13, 2016 6:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bharathkumar.g wrote: |
Vitor - how to invoke/enable DCBS explicitly. |
Speak to your local sys progs on what is their preferred method. Or better still, have whoever owns the sending app do it, as they seem to be the ones that want to do it.
In any event, speak to the sending application on why they want to use 1208 and not 1025 (which seems to be working fine and will meet your stated requirement of supporting Cyrillic). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
tczielke |
Posted: Fri May 13, 2016 10:53 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
One other note, there are tools that can validate if a message that claims to be 1208 ( UTF-8 ) is really a valid UTF-8 message. I am sure you can find free tools like this on the internet, and the MH06 supportpac has message parsing that can do this for a trace that includes the message. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
|