Author |
Message
|
chris boehnke |
Posted: Sat Oct 17, 2009 5:12 pm Post subject: Cannot convert Unicode to codepage 437 |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi All,
This is one more redundant question on unicode. I am getting a message from mainframe system and while converting the message from COBOL to XML and putting onto the HTTPReply node, I am getting the following exception:
Quote: |
XML Wring errors have occurred |
Quote: |
Source character ''c200'' in field ''63006f006d002e00740......cannot be converted from Unicode to codepage '437'.
The source character is an invalid code point within the given codepage.
Correct the application or message flow that generated the message to ensure that all data within the message can be represented in the target codepage. |
I have the CCSID set as 437 in message properties while converting the MRM message to XML. This has been working well for sometime and suddenly I got this exception and message failed. It is little bit urgent, could someone guide me.. meanwhile I will be going through the related questions on the same topic.
Thanks in advance.... |
|
Back to top |
|
 |
rekarm01 |
Posted: Sat Oct 17, 2009 9:17 pm Post subject: Re: Cannot convert Unicode to codepage 437 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
|
Back to top |
|
 |
rekarm01 |
Posted: Sat Oct 17, 2009 10:54 pm Post subject: Re: Cannot convert Unicode to codepage 437 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
chris boehnke wrote: |
I am getting a message from mainframe system and while converting the message from COBOL to XML and putting onto the HTTPReply node, I am getting the following exception:
Code: |
Source character ''c200'' in field ''6300 6f00 6d00 2e00 7400 ...'' cannot be converted from Unicode to codepage '437'.
The source character is an invalid code point within the given codepage.
Correct the application or message flow that generated the message to ensure that all data within the message can be represented in the target codepage. |
|
The target codepage ('437') cannot represent the source character (U+00c2, 'Â'). Either the target codepage is wrong, or the source character is wrong, (or both). Find out which, and fix it.
chris boehnke wrote: |
I have the CCSID set as 437 in message properties while converting the MRM message to XML. |
Why? Don't do that. For non-ASCII characters, ccsid=437 doesn't convert well with other ccsids. For the target ccsid, use either the source ccsid, or a Unicode ccsid (such as '1208': UTF-8), unless there's a compelling reason to use something else. |
|
Back to top |
|
 |
chris boehnke |
Posted: Thu Oct 29, 2009 6:52 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
rekarm01,
I am getting the same kind of error now, however, for a different character.. Could you tell me the equivalent character for this..
Quote: |
Source character ''dd00'' in field ''63006f006d002e007400680065006800610072007.............. cannot be converted from Unicode to codepage '437'.
The source character is an invalid code point within the given codepage.
Correct the application or message flow that generated the message to ensure that all data within the message can be represented in the target codepage |
It is little bit urgent. Could you tell me where to look for these equialent special charaters?
Thanks in advance |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 29, 2009 7:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There's no reason to go to 437 at all.
Pass it out as unicode. |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Oct 30, 2009 1:43 am Post subject: Re: Cannot convert Unicode to codepage 437 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
chris boehnke wrote: |
I am getting the same kind of error now, however, for a different character.. Could you tell me the equivalent character for this..
Code: |
Source character ''dd00'' in field ''6300 6f00 6d00 2e00 7400 6800 6500 6800 6100 7200 ...'' cannot be converted from Unicode to codepage '437'. |
|
The equivalent character is 'Ý' (U+00DD, "LATIN CAPITAL LETTER Y WITH ACUTE"). It does not exist in the ccsid=437 character set.
chris boehnke wrote: |
Could you tell me where to look for these equivalent special characters? |
For looking up characters in Unicode or other IBM supported ccsids, try the Unicode or IBM CDRA websites. |
|
Back to top |
|
 |
chris boehnke |
Posted: Fri Oct 30, 2009 3:48 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi rekarm01,
Thanks a lot for your response. I have replaced the CCSID to 1208 and it works fine now, however, I have one question. When I set the CCSID to 1208, I did not set the encoding value. Without the encoding set in "properties", it worked. We have to set the CCSID and corresponding encoding??
Thanks in advance. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Oct 30, 2009 3:55 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
To help answer your question, i'll pose another....
What is the purpose of ENCODING?
How could this be used when coming from the BLOB domain (a structure the broker knows nothing about unless you tell it to PARSE it somehow), specifically how would the broker know when it needed to use the ENCODING value or not to? |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Oct 30, 2009 6:31 pm Post subject: Re: Cannot convert Unicode to codepage 437 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
chris boehnke wrote: |
Without the encoding set in "properties", it worked. We have to set the CCSID and corresponding encoding?? |
For the WMB Root.Properties header (and other related headers):- Encoding is an integer field that specifies the numeric encoding of numeric data in a message (binary integers, packed-decimal integers, and floating-point numbers)
- CodedCharSetId is an integer field that specifies the character encoding of character data in a message (similar to the XML encoding declaration, or MIME/SGML charset parameter)
Related headers should have a Format field, to identify which message bytes are numeric data, and which message bytes are character data.
The Format for XML messages is typically MQFMT_STRING (all character data, and no numeric data); the XML parsers do not use the Encoding field to parse or write XML bitstreams. |
|
Back to top |
|
 |
chris boehnke |
Posted: Sun Nov 08, 2009 8:32 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi rekarm01,
Thanks for the clear explanation. |
|
Back to top |
|
 |
|