Author |
Message
|
mqjeff |
Posted: Tue Apr 10, 2012 3:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mglaiste wrote: |
I use XMLNS (I don't want to validate the XML just be able to reference the payload:-
SET outdata = InputRoot.XMLNS.Envelope.Body.Data.Row[I]; |
Use XMLNSC.
You don't need to validate the data if you use XMLNSC.
But you shouldn't use XMLNS. It's too slow. |
|
Back to top |
|
 |
mglaiste |
Posted: Tue Apr 10, 2012 3:08 am Post subject: |
|
|
Novice
Joined: 06 Jun 2003 Posts: 16 Location: TSE Port Talbot, Wales
|
Thanks, I assume this will not make any difference to the german chars issue. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Apr 10, 2012 4:05 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I assume this will not make any difference to the german chars issue. |
Probably not - but the fact remains that you are using XMLNS when the product documentation tell you to use XMLNSC. You should have a good reason to use XMLNS, or else not use it at all. |
|
Back to top |
|
 |
mglaiste |
Posted: Tue Apr 10, 2012 4:19 am Post subject: |
|
|
Novice
Joined: 06 Jun 2003 Posts: 16 Location: TSE Port Talbot, Wales
|
Hi Kimbert
Thanks for the info. I had seen that the XML domain had been deprecated in version 6.1 but hadn't seen any contra indicators for XMLNS. I will chnage to XMLNSC when I can, I don't want to change too many things at once.
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 10, 2012 9:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
mglaiste wrote: |
I use XMLNS (I don't want to validate the XML just be able to reference the payload:-
SET outdata = InputRoot.XMLNS.Envelope.Body.Data.Row[I]; |
Use XMLNSC.
You don't need to validate the data if you use XMLNSC.
But you shouldn't use XMLNS. It's too slow. |
As well you are using an index...
This should really be done using a REFERENCE. You'd be amazed at the speed improvement!. Lookup how to replace iterating over an array with a reference instead of an index...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mglaiste |
Posted: Fri Apr 13, 2012 1:15 am Post subject: |
|
|
Novice
Joined: 06 Jun 2003 Posts: 16 Location: TSE Port Talbot, Wales
|
I have traced the issue:-
The mesage flow was building a text file using the FileOutPut node. The file was then ftp'd to a Windows server. The hex values for ö was correct BUT the file, after FTP was being 'seen' as ANSI not UNICODE even though I was using CCSID 1208. This was resolved by adding the Byte Order Mark (hex ef bb bf) as the first three bytes to the first record in the output.
Many thanks to all who offerred advice.
 |
|
Back to top |
|
 |
mglaiste |
Posted: Fri Apr 13, 2012 1:27 am Post subject: |
|
|
Novice
Joined: 06 Jun 2003 Posts: 16 Location: TSE Port Talbot, Wales
|
AND ftp was set to BINARY with a custom end of line character (0D0A) suitable for the Windows environment. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 13, 2012 2:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should only have needed to add the BOM if the code page you are writing out requires the BOM. In which case broker should have written it out for you.
What I mean is, if you had to manually add the BOM it's because the READER of the file was EXPECTING a different codepage than you were sending.
It's the classic MQ problem of app A sending 437 and app B treating the data as 819.
Either the receiver has the wrong codepage or the sender is sending the wrong data. |
|
Back to top |
|
 |
mapa |
Posted: Fri Apr 13, 2012 2:32 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
It is only in Windows that UTF-8 is expected to have a BOM for identifying the data as Unicode.
It is not required, nor recommended to include the BOM for UTF-8 since it has no meaning as the byte order always is the same in UTF-8. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Apr 13, 2012 4:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
It is not required, nor recommended to include the BOM for UTF-8 since it has no meaning as the byte order always is the same in UTF-8. |
This is what the Unicode consortium ( the organisation that controls the Unicode standard) says: http://unicode.org/faq/utf_bom.html#BOM
Questions 4 and 5 seem particularly relevant. |
|
Back to top |
|
 |
mapa |
Posted: Fri Apr 13, 2012 9:13 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Yes, and the FAQ confirms that in UTF-8 the BOM is only used for identifying that it is Unicode and that it can cause problems if it is there.
(And obviously in this case, when it is NOT there).
I would absolutely say: Don't use UTF-8 BOM unless you absolutely have to...
Not as irritating as the CR (x0d) in Windows, but almost  |
|
Back to top |
|
 |
|