Posted: Thu Oct 14, 2010 6:32 am Post subject: Special characters
Apprentice
Joined: 05 Mar 2009 Posts: 31
Hi All
I am working on a XML --> XML transformation.
The target XML requires a value
"§" + vlaueA + "§" + valueB
The special character is ascii char 167. How can I generate that in ESQL?
Thanks
Neeha _________________ Neeharika Kashyap
IBM Certified System Administrator - WebSphere MQ V6.0
Trying to be IBM Certified System Administrator - WebSphere Message Broker V6.1 and IBM Certified Solution Developer - WebSphere Message Broker V6.1
Not sure about the best way to specify a Unicode character in ESQL.
There is the U'0x000' notation (or maybe Ux000? or close somewhere in that space). But as you say,
kimbert wrote:
Maybe mgk will have some advice on that.
kimbert wrote:
My solution would be to use XML entities. Instead of outputting
Code:
<tag>§value§</tag>
output this:
Code:
<tag>&#nnn;value&#nnn;</tag>
where nnn is 167.
Also ESQL is entirely in Unicode in the first place. Or at least the Toolkit provides some options to edit your ESQL files in pure Unicode rather than in platform-native text that more or less gets converted to Unicode at a later date. I believe it's properties on the ESQL Editor, in the workbench properties.
So regardless, one could in theory just plain type the '§' in an ESQL expression, and it may well get handled correctly in the runtime. (unless this particular code point does not translate well from 437/819 to 1200... )
1. Just copied the section sign '§'|| value ||'§' which worked perfectly, i verified the hex value
2. SET delim = CAST(x'a7' AS CHAR CCSID 819);
Then did output value = delim||value||delim
which also worked but only for CCSID 819..didnot work for 1208 and was putting a degree symbol instead of section sign for 1200..
So the first option looks to be more convinient.
Thanks
Sowmya _________________ Neeharika Kashyap
IBM Certified System Administrator - WebSphere MQ V6.0
Trying to be IBM Certified System Administrator - WebSphere Message Broker V6.1 and IBM Certified Solution Developer - WebSphere Message Broker V6.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