ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Encoding Arabic characters

Post new topic  Reply to topic
 Encoding Arabic characters « View previous topic :: View next topic » 
Author Message
mqlover
PostPosted: Sun Sep 19, 2010 11:21 pm    Post subject: Encoding Arabic characters Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Hi,

I have to map some arabic characters getting from backend to my OutputRoot.
I have written two statements in my ESQL.

SET OutputRoot.Properties.CodedCharSetId='1208';
set OutputRoot.Properties.ContentType='UTF-8';

After this I am hardcoding some Arabic name as follows :

SET OutputRoot.XMLNSC.ArabicName = 'للإشتراك';

But I am unable to save the ESQL file because of the reason
"Some characters cannot be mapped using "Cp1252" cahracter encoding".

I searched in the forum but did not find the appropriate answer.

Does any1 has any idea about this?

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 20, 2010 1:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You are setting the CodedCharSetId to the wrong thing. You are setting it to a CHARACTER value and not to an INTEGER value.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Sep 20, 2010 1:32 am    Post subject: Re: Encoding Arabic characters Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

mqlover wrote:
But I am unable to save the ESQL file because of the reason
"Some characters cannot be mapped using "Cp1252" cahracter encoding".

Check the "Text file encoding" in the toolkit editor preferences.
Back to top
View user's profile Send private message
mqlover
PostPosted: Mon Sep 20, 2010 5:33 am    Post subject: Encoding Arabic characters Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Yeah as its mentioned i changed the "Text File Encoding" to UTF-8.

Thanks
Back to top
View user's profile Send private message
mqlover
PostPosted: Mon Sep 20, 2010 5:48 am    Post subject: Encoding Arabic characters Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Hi I have set the OutputRoot.Properties.CodedCharSetId=437

But I am getting the exception as Parser exception and the reason is "Unconvertable character".

Does any1 have any idea about encoding this Arabic characters.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 20, 2010 5:55 am    Post subject: Re: Encoding Arabic characters Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mqlover wrote:
Hi I have set the OutputRoot.Properties.CodedCharSetId=437


That is at least a numerical value, and not a 'string' value.

The CodedCharSetID needs to a) be a NUMBER, and not a STRING, b) correctly represent the CodedCharSetID of the DATA in the message.

Your arabic characters are certainly not in Windows Ascii, which is 437.

They might be in 1208, but this is NOT the same as '1208'.

If you've changed the Text File Encoding to UTF-8, then using 1200 or 1208 is a good start.
Back to top
View user's profile Send private message
mqlover
PostPosted: Tue Sep 21, 2010 2:55 am    Post subject: Encoding Arabic characters Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Hi,

As told i have used the following statements

SET OutputRoot.MQMD.CodedCharSetId=1208;
set OutputRoot.Properties.ContentType='UTF-8';

The message is going to the output queue. But when I browse the message using MQ Explorer I can see those Arabic characters as some special characters. Is it problem with MQ Explorer which cannot read these Arabic characters or because of me setting CCSID in MQMD header has changed the message?

Should I browse the message using some other tool like rfhutil n all?

Can any1 throw some light on this?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 21, 2010 4:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

UTF-8 is a multi-byte character set.
Back to top
View user's profile Send private message
BCBS
PostPosted: Tue Sep 21, 2010 4:25 pm    Post subject: Reply with quote

Apprentice

Joined: 12 Jul 2006
Posts: 37

mqlover wrote:
Should I browse the message using some other tool like rfhutil n all?

Have you tried before asking? It takes less time to browse than type that question here.

When using RFHUtil, do a browse and save the file to local drive, and then open the message using some text editor like 'EDITPLUS'. Make sure to delete the extra characters saved as part of the message since you used RFHUtil (at the very beginning till the actual data start).
_________________
_________________________________
Back to top
View user's profile Send private message
balu2608
PostPosted: Sat Mar 02, 2013 9:47 pm    Post subject: Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Hi Mqlover,

Even iam facing the same issue can you help me in this case how did you reolve this.......



have to map some arabic characters getting from backend to my OutputRoot.
I have written two statements in my ESQL.

SET OutputRoot.Properties.CodedCharSetId='1208';
set OutputRoot.Properties.ContentType='UTF-8';

After this I am hardcoding some Arabic name as follows :

SET OutputRoot.XMLNSC.ArabicName = 'للإشتراك';

But I am unable to save the ESQL file because of the reason
"Some characters cannot be mapped using "Cp1252" cahracter encoding".
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 03, 2013 12:47 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Did you read at all the previous posts?
Like mqjeff said the CodedCharSetValue is an Integer and not a String.
So set it to an Integer already! or could it be that you do not understand the difference here?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Sun Mar 03, 2013 4:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

It's a bit odd that balu2608 has the exact same problem that mqlover had over two years ago, right down to the same misspelled "cahracter encoding" error.

balu2608 wrote:
Can any one explain me ...........................................ASAP

First please explain where all of the previously posted help above is insufficient. The longer it takes to provide a complete and accurate problem description, the longer it takes to resolve. And if a volunteer-supported forum does not provide a suitably adequate response time, then it might be better to open a PMR.

balu2608 wrote:
Code:
SET OutputRoot.Properties.CodedCharSetId='1208';

As both mqjeff and fjb_saper have pointed out, this needs to be an INTEGER, not a CHARACTER.

balu2608 wrote:
After this I am hardcoding some Arabic name as follows :

Code:
SET OutputRoot.XMLNSC.ArabicName = 'للإشتراك';

Check that the "Text file encoding" in the toolkit editor preferences supports Arabic characters. And make sure that the OutputRoot.XMLNSC tree structure represents a well-formed XML message. The top-level element is typically a Folder element.

Even if the output message is correctly formed, some testing tools may not display the characters correctly when browsing the output queue, but may offer the option to display the bytes in hex, or to save the message off to a file to view with an external editor.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Encoding Arabic characters
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.