Special Character Issue in XML Output Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
antonyraj.deva
Premium Member
Premium Member
Posts: 138
Joined: Wed Jul 16, 2008 9:51 pm
Location: Kolkata

Post by antonyraj.deva »

Murali,

The special characters will be created due to incorrect mode of data transfer across platforms. Try toggling the transfer mode to ASCII or Binary. See if this resolves the issue.

--Tony
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Let's take this from step 1. Are these characters legal ones for the text strings you are reading from DB2 or not; i.e. are you reading and transferring them correctly to DataStage (ignore XML for the moment)?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, take XML out of the picture for the moment. What is the characterset of your source and target? Do you have NLS installed?

ps. Moved to the proper forum.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Murali4u
Participant
Posts: 37
Joined: Sun Feb 21, 2010 12:27 pm

Post by Murali4u »

Thanks for inputs guys,

Yes Arnd. these are legal strings from DB2. I could query through the tables and looked the data, its looking fine.

Craig,
NLS are installed properly and by defaul it has been mapped to UTF 8.

But The next step when i do for generating xml dynamically, it results in an extra special character appended the Pound sign.
Rockzz Tech
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Take a look at the encoding that you are using....there was a thread in here a week or so ago where we were talking about the copyright symbol. In there I posted the results of some research with the various encodings. That might help.

Worst case, you'll need to convert it an put in its escaped hex value (hints also in that thread, if you can find it).

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Murali4u
Participant
Posts: 37
Joined: Sun Feb 21, 2010 12:27 pm

Post by Murali4u »

Thanks Ernie. I tried the character code and hex code earlier and resulting unsuccessful. As i told in the earlier posts i'm dynamically generating the XML's.When i pass the hex code to the appropriate db2 column. I'm getting the the hex code as &hexcode. Can you have some other way to parse it and place the code into the concerned field.

<Murali>
Rockzz Tech
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

What's wrong with the &amp hexcode? Any tool reading the xml should work fine with that too.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Lots of info out there on this, for example here. Scroll down to the 5. References section in particular the Character Predeclared Entity bit.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply