Author |
Message
|
gagan.maverick |
Posted: Fri Jun 26, 2015 1:16 am Post subject: Handling ₁ special characters |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
Hi in my input xml message i am getting something like this '₁' , so how can i convert it to '-' . As outbound sap is not able to handle it. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jun 26, 2015 1:25 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
What about the
REPLACE
ESQL function? _________________ 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 |
|
 |
gagan.maverick |
Posted: Fri Jun 26, 2015 1:33 am Post subject: |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
Hi i tried but that character is not supported in esql |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jun 26, 2015 2:23 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
gagan.maverick wrote: |
Hi i tried but that character is not supported in esql |
Are you sure?
Remember that Broker/IIB uses Unicode internally. The character should be defined in Unicode. If you find out what its HEX value is then you can create a character string with it for the replace (via a blob).
Going back to the original XML Message. What is the prologue of the message?
does it look something like
Code: |
<?xml version="1.0" encoding="UTF-8"?>
|
What is the encoding? if it is UTF-8 then there are plenty of online maps that will help you find the right character to transform. Actually, the same goes for many other Character Sets (CCSID's) _________________ 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 |
|
 |
gagan.maverick |
Posted: Fri Jun 26, 2015 2:30 am Post subject: |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
IF CONTAINS(MR1_BLOB, X'e28281')THEN
SET MR1_BLOB = REPLACE(MR1_BLOB, X'e28281', X'2d');
SET REFOUT_2."MARKETING_TEXT1" = CAST (MR1_BLOB AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId ENCODING
It worked thanks |
|
Back to top |
|
 |
nelson |
Posted: Fri Jun 26, 2015 4:11 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
gagan.maverick wrote: |
IF CONTAINS(MR1_BLOB, X'e28281')THEN
SET MR1_BLOB = REPLACE(MR1_BLOB, X'e28281', X'2d');
SET REFOUT_2."MARKETING_TEXT1" = CAST (MR1_BLOB AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId ENCODING
It worked thanks |
Remove the IF statement, you're moving through the BLOB twice.  |
|
Back to top |
|
 |
|