Author |
Message
|
BCBS |
Posted: Thu Jul 29, 2010 11:39 am Post subject: native2ascii equivalent function using ESQL |
|
|
 Apprentice
Joined: 12 Jul 2006 Posts: 37
|
Here comes another topic on conversion. Looks like there are tons of topics here covering this area. I did some search but could not find an answer to what I was curious to know.
native2ascii tool from Java does the conversion to ascii as below:
i/p: <to>xyz男装牛仔国</to>
o/p: <to>xyz\u7537\u88c5\u725b\u4ed4\u56fd</to>
Ok, now in message flow, I can add a JCN and get this conversion done. But wondering how (if) I can achieve the same using ESQL/node properties?
1) CAST function --- may be????  _________________ _________________________________ |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 29, 2010 12:04 pm Post subject: Re: native2ascii equivalent function using ESQL |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
BCBS wrote: |
Here comes another topic on conversion. Looks like there are tons of topics here covering this area. I did some search but could not find an answer to what I was curious to know.
native2ascii tool from Java does the conversion to ascii as below:
i/p: <to>xyz男装牛仔国</to>
o/p: <to>xyz\u7537\u88c5\u725b\u4ed4\u56fd</to>
Ok, now in message flow, I can add a JCN and get this conversion done. But wondering how (if) I can achieve the same using ESQL/node properties?
1) CAST function --- may be????  |
So what is the point of converting a non convertible character to a byte representation in an arbitrary character code set? It is still gibberish...
you could just as well have used 64 bit encoding...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
BCBS |
Posted: Thu Jul 29, 2010 1:01 pm Post subject: |
|
|
 Apprentice
Joined: 12 Jul 2006 Posts: 37
|
fjp_saper wrote: |
you could just as well have used 64 bit encoding.. |
Right, agreed. Suppose if the source app doesn't have the capability for binary encoding algorithms (like UUencode, base64), wondering if the encoding can occur in MB layer. _________________ _________________________________ |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 29, 2010 7:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
BCBS wrote: |
fjp_saper wrote: |
you could just as well have used 64 bit encoding.. |
Right, agreed. Suppose if the source app doesn't have the capability for binary encoding algorithms (like UUencode, base64), wondering if the encoding can occur in MB layer. |
Sure you can, but you didn't need a JCN to do it. A call to a java function/procedure from ESQL could have done it just as well.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jul 30, 2010 1:44 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your native2ascii approach sounds wrong. I think you should be fixing the downstream application so that it can either
a) deal with an any incoming encoding or
b) handle binary BLOB data in at least one form |
|
Back to top |
|
 |
|