Author |
Message
|
umashankar2050 |
Posted: Mon Apr 06, 2015 12:28 am Post subject: Arabic Characters in ESQL |
|
|
Newbie
Joined: 19 Dec 2012 Posts: 8
|
Dear Friends,
I hard coded the arabic characters in esql as below.
SET OutputRoot.XMLNSC.ArabicString = CAST('مكتب مستشار صاحب السمو الملكي رئيس' AS CHARACTER CCSID 1208);
But when I ran the message flow, I am getting the output as junk values(مكتب مستشار ØµØ§ØØ¨ السمÙ) in soap UI.
I ran in debug mode but there also it is showing junk characters.
Please help me in resolving this issue.
Thanks in advance. |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Apr 06, 2015 2:48 am Post subject: Re: Arabic Characters in ESQL |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
umashankar2050 wrote: |
Code: |
SET OutputRoot.XMLNSC.ArabicString = CAST('مكتب مستشار صاحب السمو الملكي رئيس' AS CHARACTER CCSID 1208); |
But when I ran the message flow, I am getting the output as junk values(مكتب مستشار ØµØ§ØØ¨ السمÙ) in soap UI. |
This is already a CHARACTER string. Casting CHARACTER AS CHARACTER has no effect. The CCSID would probably be more useful in the output message header:
Code: |
SET OutputProperties.CodedCharSetId = 1208;
SET OutputRoot.XMLNSC.ArabicString = 'مكتب مستشار صاحب السمو الملكي رئيس'; |
Also, check the HTTP Response headers, whether the "Content-Type" field specifies the utf-8 charset. |
|
Back to top |
|
 |
umashankar2050 |
Posted: Mon Apr 06, 2015 9:57 pm Post subject: |
|
|
Newbie
Joined: 19 Dec 2012 Posts: 8
|
Thanks for your reply.
I tried with this option also.
Code: |
SET OutputProperties.CodedCharSetId = 1208;
SET OutputRoot.XMLNSC.ArabicString = 'مكتب مستشار صاحب السمو الملكي رئيس'; |
But it didnt work.
Both request and response HTTPheaders Content-Type is showing as 'UTF-8' only. |
|
Back to top |
|
 |
umashankar2050 |
Posted: Tue Apr 07, 2015 4:22 am Post subject: |
|
|
Newbie
Joined: 19 Dec 2012 Posts: 8
|
The same scenario is working in "Java Compute" Node.
But it is not working in ESQL compute node. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Apr 07, 2015 6:04 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Ok, send the output from BOTH nodes to a Queue. Then examine the differences.
If it works on one and not the other then there is something different in the code.
You could even put a trace node in the output stream (No debugger please) and set it to dump the ${Root} and ${LocalEnvironment}
If it helps you could even post it here.
Atthe moment, you really have not given us a lot of details to work with. _________________ 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 |
|
 |
MrSmith |
Posted: Tue Apr 07, 2015 7:09 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
I have a couple of questions to add
1) is the output you mention in
Quote: |
I hard coded the arabic characters in esql as below.
SET OutputRoot.XMLNSC.ArabicString = CAST('مكتب مستشار صاحب السمو الملكي رئيس' AS CHARACTER CCSID 1208);
But when I ran the message flow, I am getting the output as junk values(مكتب مستشار ØµØ§ØØ¨ السمÙ) in soap UI.
I ran in debug mode but there also it is showing junk characters.
Please help me in resolving this issue. |
if that is the output seen in SOAPUI you need tio first determine SOAPUI is not casuing the effect, if the output is from a trace then showing the relevant part of the trace here may be more helpful
2) Have you checked that the Arabic words / letters you are trying to CAST to that CCSID all actually have a UTF-8 representation, your resulting value could be that it has either only partially done the conversion or has taken represetnative values and "tried its best"
3) As already said CASTING a CHAR to a CHAR has no effect so create the string you want as a BLOB and then CAST it as CHAR with a CCSID and see what result you get form that there are plenty of online hext to text and vice versa utilities to check your results against
Suggestion assuming you have access to your Broker Queue Manager - use a more simplistic flow cut SOAPUI out of it for the moment. _________________ -------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.” |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 07, 2015 7:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should also double-check the codepage of the actual ESQL file in Toolkit. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Apr 08, 2015 4:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
umashankar2050 wrote: |
The same scenario is working in "Java Compute" Node.
But it is not working in ESQL compute node. |
If using an external editor to edit ESQL files outside the toolkit, rather than the ESQL editor, make sure that they're both configured for the same character encoding, as mqjeff suggested.
Exactly where to check for this in the toolkit depends on the version, but one of these might work:- Window -> Preferences -> Workbench -> Editors -> Text file encoding
- Window -> Preferences -> General -> Workspace -> Text file encoding
|
|
Back to top |
|
 |
|