Author |
Message
|
geethgubi |
Posted: Wed Jun 24, 2009 1:15 pm Post subject: Unconvertable character issue |
|
|
Apprentice
Joined: 18 Dec 2008 Posts: 44
|
I am very new to Message broker. I am getting unconvertable character in my message flow. There is one latin capital letter in the xml thats coming in from the external source. I read few postings in this forum regarding the unconvertable character issue and they advised to find the code page belonging to that character and set the MQMD.Cha...codeSet property. But I assume if I set that property then my entire xml message would be converted to that code page. I dont want that one. I jus encoded only this particular value to the required code page like the below.
SET Environment.Variables.INPUT[1].PATIENT_NAME = CAST(Environment.Variables.INPUT[1].PATIENT_NAME AS CHARACTER CCSID 1252);
But then the propagate statement is throwing unconvertable character. I am using XMLNSC as the domain. I didnt set any MQMD headers in the message flow. So please help me out in this situation. Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 24, 2009 2:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
This looks a lot like this post to me.
The inbound message should be set by the sender to the code page which was used to write the message. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
geethgubi |
Posted: Wed Jun 24, 2009 2:58 pm Post subject: |
|
|
Apprentice
Joined: 18 Dec 2008 Posts: 44
|
I am sorry about that. I will clearly explain to you. I dont have inbound message. I am fetching the data from the db2 database and constructing an xml by my own and propagating that xml into different message flow to get it stored in different database. The special character (Latin Capital character) is there in one of the columns of the table which is required for the xml construction. The xml construction is not a problem, but the unconvertible character is thrown in propagate statement. Even after the below statement,
SET Environment.Variables.INPUT[1].PATIENT_NAME = CAST(Environment.Variables.INPUT[1].PATIENT_NAME AS CHARACTER CCSID 1252);
Please let me know if I have to do anything else. Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 24, 2009 10:45 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ah - ok! No input message. So what code page is the input from the DB2 coded in? What code page is 1252? Can the DB2 code page be converted to 1252? Is 1252 the right choice for your output? Does it support all the characters you need? Does the use of this characters within an XML document require special markup or other treatment?
These and other questions will lead you to your answers. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 25, 2009 2:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
More food for thought. Have you chosen the output CCSID yet? Is that latin character available in the output ccsid? As you talk about xml would you like the output ccsid to be UTF-8? (ccsid 1208 )?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
geethgubi |
Posted: Thu Jun 25, 2009 7:23 am Post subject: |
|
|
Apprentice
Joined: 18 Dec 2008 Posts: 44
|
The xml that I am constructing within the message flow is already UTF-8 encoded one. With the below link, I think the Latin character (Ô) which is there in the db2 database is included in UTF-8 encoding
http://sitening.com/extras/utf-8-character-html-encoding/
Please let me know if I am doing anything wrong? |
|
Back to top |
|
 |
geethgubi |
Posted: Thu Jun 25, 2009 10:29 am Post subject: |
|
|
Apprentice
Joined: 18 Dec 2008 Posts: 44
|
Thanks for all your help. I fixed the issue. I put 'UTF-16' encoding and it worked. DB2 is based on UTF-16. |
|
Back to top |
|
 |
|