Sreenath G

Sreenath G

  • NA
  • 233
  • 310.6k

Encoding UTF 8 in ASP.Net for Decoding in UTF 8 in JAVA

Apr 6 2011 8:56 AM
 

Hi,

I need clarification on how can I do encoding on my string to meet Decoding in Java for ToBase64 and UTF8 decoding.

I am doing the following logic, but even then the characters are showing junk. I am using this for Japanese characters (Max UTF 8)

 

/*********************************

byte[] lArrByte = ASCIIEncoding.UTF8.GetBytes(strInputMsg.ToCharArray());

 

string lSTrBase64String = Convert.ToBase64String(lArrByte);

 

queueMessage.WriteBytes(lSTrBase64String);

queueMessage.CharacterSet = lSTrBase64String.Length;

queueMessage.Format = MQC.MQFMT_IMS_VAR_STRING;

queuePutMessageOptions = new MQPutMessageOptions();

queue.Put(queueMessage, queuePutMessageOptions);

queueManager.Commit();

/*********************************

 

Any Suggestions on this please.

Thanks

Sreenath.


Answers (1)