Convert String from EBCDIC to Unicode / UTF8

前端 未结 2 1302
情书的邮戳
情书的邮戳 2021-01-22 04:21

I\'m able to send messages from Java to Websphere MQ on AS400. If I send messages from WinXP, there is no difference if I use

相关标签:
2条回答
  • 2021-01-22 05:02

    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.

    0 讨论(0)
  • 2021-01-22 05:07
     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.

    0 讨论(0)
提交回复
热议问题