Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:12:13+00:00 2026-06-05T22:12:13+00:00

I’m able to send messages from Java to Websphere MQ on AS400 . If

  • 0

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 any accessible Locale, including full Language Localization; nor is there a problem with English Locale. Important for correct encoding is only this code line:

msgId.characterSet = 1208;

Infortunately, it’s not valid. There are differences in the case that I want to take the message from MQ Queue.

  • In the case that I get message from MQ Queue from Windows OS (English without any of Language Pack), I’m able to take message from MQ Queue in String form.

  • In the case that Windows OS is Full Localized with some of Language Pack, I am receiving an exception

Exception occured while to message buffer :
    java.io.UnsupportedEncodingException: Cp870 

from code (removed balast from try – catch – finally block)

try {
    Class.forName("com.ibm.mq.MQEnvironment");
    MQEnvironment.hostname = hostname;
    MQEnvironment.port = port1;
    MQEnvironment.channel = channel;
    MQEnvironment.userID = userID;
    MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);
    try {
        qmgr1 = new MQQueueManager(qmanager);
        MQGetMessageOptions gmo = new MQGetMessageOptions();
        int openOptions2 = MQC.MQOO_INPUT_SHARED;
        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
        gmo.waitInterval = 3000;
        getq = qmgr1.accessQueue(responseQueue, openOptions2);
        while (true) {
            try {
                responseFromQUEUE = "";
                MQMessage msgId = new MQMessage();
                //putmsg.characterSet = 437;// Set code page to ASCII
                //putmsg.characterSet = 1200;// Set code page to UNICODE
                msgId.characterSet = 1208;
                getq.get(msgId, gmo);
                String str = msgId.readLine();
                //responseFromQUEUE = CpConv.tf870to1250(msgId.readLine());
                //own EncodePage doesn't works too
                if (responseFromQUEUE.length() == 0) {
                    break;
                }
            } catch (MQException mqx) {
                if (mqx.reasonCode == EMPTY_QUEUE) {
                } else {
                }
            }
        }
    } catch (MQException mqx) {
    } finally {
    }
} catch (IOException ex) {
} catch (ClassNotFoundException e) {
}

please

  • is there some parameter(s), something that I miss there for take String from MQMessage#readLine()

  • my question here is only about String conversion,

  • I haven’t any issue with Encode from MQMessage#getBytes

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:12:15+00:00Added an answer on June 5, 2026 at 10:12 pm

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.