Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CCSID problem

Status
Not open for further replies.

JorgeSerna

Programmer
Mar 12, 2002
2
ES
Hi,

I'm working on a client application in Java that must access a QMGR in a Solaris system. The QMGR has a CCSID value of 437 (this must be so because it sends messages to a NT server which cannot change its CCSID).

The system goes well using amqsput/amqsget, even using special Spanish characters, such as Ñ.

But when I use the Java client to put a message, and then I retrieve it using amqsget, Spanish characters are modified (Ñ turns into ¥).

The code I use to set the CCSID on the message is as follows:

message.format = MQC.MQFMT_STRING;
message.characterSet = 437;
message.writeString(content);

Is there something missing? Can anybody help?

thank you very much,

Jorge
 
Ok, it's solved. The point is that when using the 437 encoding to be able to use characters such as Ñ you must use the

message.writeBytes(content);

method instead of writeString.

That's it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top