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 » Changing the Input from western Europen to Utf-8

Post new topic  Reply to topic
 Changing the Input from western Europen to Utf-8 « View previous topic :: View next topic » 
Author Message
kevinmark99
PostPosted: Tue Apr 02, 2013 5:29 am    Post subject: Changing the Input from western Europen to Utf-8 Reply with quote

Newbie

Joined: 29 Mar 2013
Posts: 8

I have used the following code
question1 on ABISTREAM-> the encoding,ccsid which we give as parameters shd they be of the originating source or desired data format

Code:

   SET Environment.Variables.InputMsg = ASBITSTREAM(InputRoot.XMLNSC ENCODING 546 CCSID 1208 OPTIONS FolderBitStream);
   SET Environment.Variables.InputMsg = CAST(Environment.Variables.InputMsg AS CHARACTER CCSID 1208 ENCODING 546);
   CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(Environment.Variables.InputMsg, 546, 1208);
   SET OutputRoot.Properties.CodedCharSetId = 1208;   
   SET OutputRoot.MQMD.Encoding = 546;
   SET OutputRoot.MQMD.CodedCharSetId = 1208;


I can see at the last debug point that it got converted into UTF-8 and the problem is when i put in the queue and see it in app watch i can see that they get changed to
Encoding : 546 CodedCharSetId : 437

question2:Even when we enforce its encoding and ccsid why does it change when it enters the queue??
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Apr 02, 2013 5:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

What code page is set for your QMGR?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kevinmark99
PostPosted: Tue Apr 02, 2013 5:39 am    Post subject: Reply with quote

Newbie

Joined: 29 Mar 2013
Posts: 8

This is on Qmgr

CCSID 819

Im a newbie..i saw this in appwatch please tell me if anything u need so that i can somehow findout
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Apr 02, 2013 6:05 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Now think what would happen if someone coded their application to write data to the Queue with CCSID=500.

Sadly most app developers don't have a clue what CCSID they are using and what the implications are if they get it wrong or even worse when the CCSID specified does not match the CCSID of the data.

My general rule of thumb is to make (if at all possible) all Qmgrs use CCSID=1208.
If you did that you would prpbably find a fewer number of problems relating to CCSID.

Quite why IBM still stick with non UTF CCSID as the queue manager defaults is another issue entirely.
_________________
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
View user's profile Send private message
kevinmark99
PostPosted: Tue Apr 02, 2013 6:44 am    Post subject: Reply with quote

Newbie

Joined: 29 Mar 2013
Posts: 8

What do u think will be the solution in my case...to change Qmanager defaults..??

I was thinking overriding will usually takes precedence over defaults..

can u tell me is there any other ways other than changing the default Q mgr ccsid?
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed Apr 03, 2013 12:42 am    Post subject: Re: Changing the Input from western Europen to Utf-8 Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

kevinmark99 wrote:
Code:
   SET Environment.Variables.InputMsg = ASBITSTREAM(InputRoot.XMLNSC ENCODING 546 CCSID 1208 OPTIONS FolderBitStream);
   SET Environment.Variables.InputMsg = CAST(Environment.Variables.InputMsg AS CHARACTER CCSID 1208 ENCODING 546);
   CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(Environment.Variables.InputMsg, 546, 1208);

This appears to convert from CHARACTER to UTF-8 back to CHARACTER again. There's no reason to do that. A simple SET statement would have the same net effect:

Code:
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;

The XML parsers already convert, using the input ccsid when copying data from the input bitstream to the message tree, and using the output ccsid when copying data from the message tree to the output bitstream.

kevinmark99 wrote:
Code:
   SET OutputRoot.Properties.CodedCharSetId = 1208;   
   SET OutputRoot.MQMD.Encoding = 546;
   SET OutputRoot.MQMD.CodedCharSetId = 1208;

I can see at the last debug point that it got converted into UTF-8 and the problem is when i put in the queue and see it in app watch i can see that they get changed to
Encoding : 546 CodedCharSetId : 437

Make sure that AppWatch is not configured to convert the message when browsing the output queue.

kevinmark99 wrote:
can u tell me is there any other ways other than changing the default Q mgr ccsid?

The qmgr ccsid is probably not relevant here.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 03, 2013 1:02 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

437 is your PC's codepage.

Look at the message unconverted.

Most tools convert it automatically when they MQGET the message but you can usually disable this.
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 » Changing the Input from western Europen to Utf-8
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.