Convert String from EBCDIC to Unicode / UTF8

自作多情 提交于 2019-12-01 23:29:31
Shashi

CP870 is EBCDIC host code page. To what locale are you changing the Windows to when the exception occurs? Do you still use msgId.characterSet = 1208; after the local is changed? It looks like Java libraries are unable to convert the incoming message that is in CP870 to your current locale.

Check what is the Windows code page when you change the locale and see if 1208 is correct for msgId.characterSet.

 gmo.options = MQC.MQGMO_NO_SYNCPOINT; //Set no sync point
 gmo.options = MQC.MQGMO_CONVERT; //Handles ASCII/EBCDIC
 gmo.options = MQC.MQGMO_WAIT; //Wait until message arrives

this code is wrong, you are overwriting the option, you need | them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!