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 » How to convert XML message coming in UTF-8 to Shift_JIS

Post new topic  Reply to topic
 How to convert XML message coming in UTF-8 to Shift_JIS « View previous topic :: View next topic » 
Author Message
gyadavil
PostPosted: Wed Aug 10, 2005 12:11 pm    Post subject: How to convert XML message coming in UTF-8 to Shift_JIS Reply with quote

Acolyte

Joined: 01 Feb 2005
Posts: 62

Hi

I am having trouble converting data coming to WBI in UTF-8 format. I receive this data from SAP using mySap adapter. XML has UTF-8 encoding. I need to convert this data to Shift_JIS and insert into DB2. I tried changing the conversion options on input node and also wrote esql code in a compute node before my insert statement to convert from utf-8 to Shift_JIS(932). But no use. If I try to use 932 as my encoding number in a create field command while parsing a blob taken from utf-8, I am getting parsing errors. If I give 932 in the input node properties, I don't see any change in the data. I am getting MQRFH2 header also.

can some one help me out. I am totally lost how to convert this ??

Thanks in advance.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 10, 2005 12:32 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It won't be converted until you put it to an MQOutput, or run it through ASBITSTREAM.

As long as the data is inside a message flow, it is Unicode.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
gyadavil
PostPosted: Wed Aug 10, 2005 12:51 pm    Post subject: Reply with quote

Acolyte

Joined: 01 Feb 2005
Posts: 62

[quote="jefflowrey"]It won't be converted until you put it to an MQOutput, or run it through ASBITSTREAM.

As long as the data is inside a message flow, it is Unicode.[/quote]

Thanks for the response. Even I am doing asbitsteam. But when I try to parse the blob I got from asbitstream using 932 I am getting parsing error. It is not able to parse these characters.

DECLARE CHARS1208 BLOB;

--DECLARE vEncodingStr Char '<?xml version="1.0" encoding="Shift_JIS"?>';
DECLARE vEncodingStr Char '3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D2253686966745F4A4953223F3E';
Declare vEncodingBlob Blob;
Set vEncodingBlob = Cast(vEncodingStr As Blob);

Set CHARS1208 = ASBITSTREAM(InputRoot.MRM ENCODING InputRoot.MQRFH2.Encoding
CCSID InputRoot.MQRFH2.CodedCharSetId
SET InputRoot.Properties.MessageSet
TYPE InputRoot.Properties.MessageType
FORMAT InputRoot.Properties.MessageFormat);

Set CHARS1208 = vEncodingBlob||Substring(CHARS1208 From 39);

CREATE LASTCHILD OF Environment.Variables.Name819 DOMAIN 'MRM' PARSE(CHARS1208 ENCODING 273 CCSID 932
SET InputRoot.Properties.MessageSet
TYPE InputRoot.Properties.MessageType
FORMAT InputRoot.Properties.MessageFormat);

I can see the error message in the Environment.Variables.MRM
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 » How to convert XML message coming in UTF-8 to Shift_JIS
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.