|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Conversion, what about the XML encoding field ? |
« View previous topic :: View next topic » |
Author |
Message
|
boos |
Posted: Fri Apr 07, 2006 1:41 am Post subject: Conversion, what about the XML encoding field ? |
|
|
 Apprentice
Joined: 27 Jan 2004 Posts: 37 Location: Netherlands
|
Hello,
I would like to know if others have a solution for the following issue.
I 'put' a XML message on a iSeries (CCSID 1140) which begins with
<?xml version="1.0" encoding="IBM01140" ?>
when I 'get' the message on a windows machine (CCSID 1252, or CCSID 1208 if its a java application) with the convert option it works fine. But a XML parser would have problems with it because within the message its encoding stll says "IBM01140" (haven't tried it yet, but that sounds likely). Is there an easy way to solve this (i.e. get the right encoding code in there).
The nicest way would be if there was an automated way where the CCSID of the (queuemanager) on the 'get' machine gets translated into the right XML enocoding code (and put in the right place within the message).
Did anyone write an exit program which solves this ? Or is there something like a XMLget which does precisely that. On the other hand maybe we should do a 'get' without a convert (so the parser would work fine but we can't do anything with the message). Anyone any thoughts on this (hypothetical) problem ? |
|
Back to top |
|
 |
Bluetack |
Posted: Mon Apr 10, 2006 4:56 pm Post subject: |
|
|
Newbie
Joined: 10 Apr 2006 Posts: 2 Location: South of the Equator
|
As somebody who cut their teeth on IBM hardware, I am loath to dump on EBCDIC machines. But ... XML was designed for ASCII, UNICODE etc not EBCDIC. That is why there are characters like ![] which are fine in ASCII but which get EBCDIC all in a tizzy, depending on which EBCDIC code page the particular application is running on. Those who insist on designing applications to process XML on EBCDIC machines should be made to recite that portion of the XML specs that say that XML processors are REQUIRED to read UTF-8 and UTF-16 ... and be told that all XML messages are going to be in UTF-8 (CCSID 1208), so they'd better get with it, or sign a document in blood stating their software is not XML-conformant.
Doesn't help with your problem, though! |
|
Back to top |
|
 |
JLRowe |
Posted: Tue Apr 11, 2006 1:01 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
The elegant solution is to get the sender to translate the message to 1208, and put 1208 in the encoding.
The cruddy solution is to continue putting the message in EBCDIC, and hack the receiver to change the encoding in the received message. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 11, 2006 1:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I must say I've never used an XML document that didn't have UTL-8 encoding. Where the content has been required to enter or leave the mainframe world (and I'm a rehabilitated COBOL programmer so it gives me a wave of nostalga) I've used an appropriate cludge (sorry, small code snippet) to convert it into fixed length or delimited string then relied on MQGMO_CONVERT. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|