Author |
Message
|
gilbert |
Posted: Tue Oct 31, 2006 8:48 am Post subject: XML Character problem when using JMSInput [solved] |
|
|
Novice
Joined: 31 Oct 2006 Posts: 14
|
Hello MQ people!
We have a problem with special characters (i.e. umlauts) not coming through correctly when using JMSInputs. Messages are flowing through our system like this (contains 3 workflows):
Queue -> JMSInput -> Compute -> JMSOutput -> topic -> JMSInput -> Compute -> JMSOutput -> topic -> JMSInput -> Compute -> JMSOutput -> Queue
Message domain in use is MRM. If i just do a simple OutputRoot = InputRoot and won't touch the XML content it works. When using Blob it works. If using straightforward MQInput-compute-MQOuput it works. But it doesn't work with combination of MRM and JMS nodes.
The CCSID and XML encoding seem to be the "moving parts" of this problem. So I have tried changing the QueueManager's CCSID, JMS Admin tools CCSID options when creating the bindings and XML with different encodings. Obviously unicode / latin would be desirable, but putting CCSID 1208 to everywhere didn't solve this one. Or several other CCSIDs tried.
Also all of the XML messages coming out from the flow seem to have enconding=UTF-8 which isn't intention.. maybe i should try to force the XML encoding in ESQL?
And Everything is runnin on a same Windows server.
Help...anyone. I have done searching on this matter but can't find the answer.
TIA
Last edited by gilbert on Fri Nov 17, 2006 12:27 am; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Tue Oct 31, 2006 1:52 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi,
Everything in the message tree is in UTF16 ( code page 1200 ). That explains why the BLOB domain does not exhibit the problem ( no code page conversion to do ).
What happens to the umlaut? Does it get deleted? Changed into another character? Is it just the umlaut which is affected?
Quote: |
If using straightforward MQInput-compute-MQOuput it works |
Did you actually parse the message in this flow, or did you just do a simple OutputRoot=InputRoot?
Code: |
But it doesn't work with combination of MRM and JMS nodes |
Have you tried this with the XMLNS parser instead of the MRM parser? ( and do you know why you are using MRM in your flow? ). |
|
Back to top |
|
 |
gilbert |
Posted: Wed Nov 01, 2006 12:37 am Post subject: |
|
|
Novice
Joined: 31 Oct 2006 Posts: 14
|
The umlaut doesn't get deleted. It is just a mess of characters depending what value I have given for xml encoding attribute. For example: � or �
I have to look back if it works when parsing the message in that case when I'm using MQInput -> MQOutput. I can't remember...
XMLNS parser works. I'm using MRM because of the validation. There's allways of course the option of validating manually in ESQL but that's just a workaround and it would be nice to get MRM working too.. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Nov 01, 2006 1:47 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I suggest putting a trace node with pattern ${Root} after the first input node and before the last output node. That way you will quickly find out whether the error is being introduced by the parsing or by the writing. |
|
Back to top |
|
 |
gilbert |
Posted: Wed Nov 01, 2006 5:51 am Post subject: |
|
|
Novice
Joined: 31 Oct 2006 Posts: 14
|
If I put XML to the queue with <?xml version="1.0" encoding="ISO-8859-1"?> they are wrong straight after the JMSInput. In a trace file it shows 'Ä' as a square. CCSID in the properties folder is 1208.
If I use <?xml version="1.0" encoding="UTF-8"?> the characters seem to be correct all the way through the flow (by looking at the trace and using toolkit debugger) but in the target queue 'Ä' is shown as 'Ä'
About the concept of CCSID:
-IBM Codepage for ISO-8859-1 is 819
-Windows Codepage for ISO-8859-1 is 1252
Our system is running on Windows so which codepage should i use if I wanted to use ISO-8859-1 encoding? 819 or 1252? Should these values be same both for Queue Manager and JMS Admin? |
|
Back to top |
|
 |
gilbert |
Posted: Wed Nov 01, 2006 8:40 am Post subject: |
|
|
Novice
Joined: 31 Oct 2006 Posts: 14
|
What defines message's CCSID? In my case it seems to be 1208 allways whatever is the queue managers CCSID or whatever is XML document's encoding. I guess it is the program which does the put or publish? |
|
Back to top |
|
 |
gilbert |
Posted: Fri Nov 17, 2006 12:30 am Post subject: |
|
|
Novice
Joined: 31 Oct 2006 Posts: 14
|
Seems like most of the problems have been solved with changes to creation of administered object. When usin JSM admin tool defining target client as MQ prevents messages being converted to wrong (byte) format and therefor avoidin unnecessary character converrsions.
So this should do the trick:
def topic/queue TC(MQ) |
|
Back to top |
|
 |
|