ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing € in UNIX box is giving an error for the ISO-8859-1

Post new topic  Reply to topic
 Parsing € in UNIX box is giving an error for the ISO-8859-1 « View previous topic :: View next topic » 
Author Message
rexita
PostPosted: Fri Oct 07, 2011 3:51 am    Post subject: Parsing € in UNIX box is giving an error for the ISO-8859-1 Reply with quote

Newbie

Joined: 06 Oct 2011
Posts: 4

I am not able to convert the € symbol on the Unix Broker machine,The broker uses the ISO-8859-1 std and CSSID is 819,However i read that 819 will not convert the euro symbol into the respective code,Kindly help me
Back to top
View user's profile Send private message
rexita
PostPosted: Fri Oct 07, 2011 4:09 am    Post subject: parsing error Reply with quote

Newbie

Joined: 06 Oct 2011
Posts: 4

"You really need the message to be sent in a code page that supports all the needed characters."

Can you please explain what does the above mentioned sentence mean???
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Oct 07, 2011 4:24 am    Post subject: Re: Parsing € in UNIX box is giving an error for the ISO-885 Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

rexita wrote:
I am not able to convert the € symbol on the Unix Broker machine,The broker uses the ISO-8859-1 std and CSSID is 819,However i read that 819 will not convert the euro symbol into the respective code,Kindly help me


Please see my earlier post in this thread.

ISO-8859-1 does not and never will support the use of the Euro Symbol.
You need to send the original message in a Character set that includes the support for the € symbol. If you don't then you won't get the right result.

Kimbert's first rule of CharacterSet conversion/coding says:-
You can't 'properly' fix wrongly coded data.
His Second rule is:-
Fix the SENDER rather than spending hours in Broker trying to Bodge it.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
rexita
PostPosted: Fri Oct 07, 2011 4:46 am    Post subject: Reply with quote

Newbie

Joined: 06 Oct 2011
Posts: 4

The sender is a mainframe machine,
The following are the things i have done:

DECLARE inCCSID INT 923;
DECLARE inEncoding INT InputRoot.Properties.Encoding;
--Convert it into BLOB
DECLARE msgBitStream1 BLOB ASBITSTREAM(InputRoot.XML CCSID inCCSID ENCODING inEncoding);
--DECLARE msgBitStream1 BLOB InputRoot.BLOB.BLOB;
--Convert BLOB into Sequence Character
DECLARE msgChar CHAR CAST(msgBitStream1 AS CHAR CCSID 923 ENCODING inEncoding);


CREATE LASTCHILD OF OutputRoot DOMAIN('XML') PARSE(msgBitStream1,inEncoding,inCCSID);

I have set the character code set as u mentioned but still i am not able to get it working .Kindly tel me whicg is the CCSID that i am supposed to use and is this code correct ? as i am new to this technology
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Oct 07, 2011 4:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you are new to this technology, I will tell you right now to STOP using InputRoot.XML.

Use the XMLNSC domain for all XML data, do not use the XML domain.

If you do not understand what I've just said, then you need to stop doing any message broker development and start reading the documentation until you DO understand what I just said. I am not saying this to be cruel or to be mean, I am stating facts.

You have been told a few times that you SHOULD NOT FIX THIS in Broker.

You are still trying to fix this in Broker.

You need to CHANGE THE SENDING APPLICATION ON THE MAINFRAME. It *needs* to specify *the correct* setting.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 4:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Split from this to improve clarity and becuase it's a slightly different issue.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 4:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
If you are new to this technology, I will tell you right now to STOP using InputRoot.XML.

Use the XMLNSC domain for all XML data, do not use the XML domain.





mqjeff wrote:
You need to CHANGE THE SENDING APPLICATION ON THE MAINFRAME. It *needs* to specify *the correct* setting.



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri Oct 07, 2011 6:36 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

rexita wrote:

DECLARE inCCSID INT 923;
DECLARE inEncoding INT InputRoot.Properties.Encoding;

Kindly tel me whicg is the CCSID that i am supposed to use and is this code correct ? as i am new to this technology


Well you are using the Encoding from the input message, why aren't you using the CCSID from the input message?

You need to read in the input data in the CCSID that the message was actually written in, not what you want it to be. The input message will tell you what CCSID to use.

And as others have said, stay away from the XML parser. Use XMLNSC.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Oct 07, 2011 6:49 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Go back to first principals.....

Check that the message being sent from the MF is being sent with a CCSID that includes support for the Euro Symbol
Then check that no implicit conversion is being done by an intermediate QM on any channels.
Then AND ONLY THEN start messing with your flow.

You really need to be sure that the data being presented to your flow is 1000000% correct othewise Kimbert's 1st Law will apply.

As others have found, you need to make sure that the tool you are using to view the data is also capable of handing different CCSID's. If it isn't then you have to fall back upon the actual HEX value and and online Code page converter such as http://en.wikipedia.org/wiki/ISO/IEC_8859-15#Codepage_layout.
If you don't do this you could easily be fooled by false positives. Like Fools Gold really.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Sun Oct 09, 2011 3:43 pm    Post subject: Re: Parsing € in UNIX box is giving an error for the ISO-885 Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

rexita wrote:
"You really need the message to be sent in a code page that supports all the needed characters."

Can you please explain what does the above mentioned sentence mean?

A code page specifies a fixed set of characters, and assigns a unique integer value to each character in the specified character set. A code page does not assign a value to any other characters. An application needs to assign a value to every character in a message, in order to convert it from characters to bytes.

rexita wrote:
The broker uses the ISO-8859-1 std and CSSID is 819

What does that mean? Which CCSID is 819? A message flow does not have to use the default qmgr ccsid to read/write a message. Normally, the sending application specifies the input ccsid that the message flow uses to read its input message; the message flow can only specify the output ccsid that it uses to write its output message.

rexita wrote:
i read that 819 will not convert the euro symbol into the respective code, Kindly help me

That's correct. 819 won't work, so don't use it to write a message with a euro symbol. Generally:
  • When an application writes a message, it should use a character encoding (ccsid) that recognizes all of the characters in the message, to convert chars->bytes.
  • When an application reads a message, it should use the same character encoding (ccsid) that the writer used to write it, to convert bytes->chars.
Check every component along the message path that converts on read/write:
  • What ccsid does the mainframe application use to write the message? Does the mainframe ccsid recognize the euro symbol? Does the mainframe application include the same ccsid as part of the message?
  • Is there anything between the mainframe and message flow that might convert the message from one ccsid to another, such as an WMQ channel, or MQInput node? If so, does the resulting ccsid recognize the euro symbol? Does the converting component include the resulting ccsid as part of the message?
  • Does the message flow need to convert the message from one ccsid (input ccsid) to another (output ccsid)? If so, does the resulting ccsid recognize the euro symbol? Does the message flow include the output ccsid as part of the message?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing € in UNIX box is giving an error for the ISO-8859-1
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.