I have "QTextcodec" problem...



  • I have "HP-UX" Server two (A, B).
    Execute test code in A Server, works well.
    But, when execute test code in B Server, make core dump...
    Must suspect what?

    A Server result

    01 : QTextCodec* pLocaleCodec = QTextCodec::codecForLocale();
    01-01 : pLocaleCodec(bc90) not null
    01-02 : pLocaleCodec->name().data() : System

    ====================================================
    02 : QString strNewCodecName = "EUC-KR"
    03 : QTextCodec* pnewCodec = QTextCodec::codecForName(strNewCodecName.toAscii().data());

    B Server result

    QTextCodec *p = 0000000000000000
    Memory fault(coredump)

    test code
    @
    printf("\n");
    printf("====================================================\n");
    QTextCodec* pLocaleCodec = QTextCodec::codecForLocale();
    printf("01 : QTextCodec* pLocaleCodec = QTextCodec::codecForLocale();\n");

    if(pLocaleCodec != NULL)
    {
    printf("01-01 : pLocaleCodec(%x) not null\n",pLocaleCodec);
    printf("01-02 : pLocaleCodec->name().data() : %s\n",pLocaleCodec->name().data());
    }
    printf("====================================================\n");
    printf("\n");
    printf("====================================================\n");
    printf("02 : QString strNewCodecName = "EUC-KR"\n");
    QString strNewCodecName = "EUC-KR";
    printf("03 : QTextCodec* pnewCodec = QTextCodec::codecForName(strNewCodecName.toAscii().data());\n");
    QTextCodec* pnewCodec = QTextCodec::codecForName(strNewCodecName.toAscii().data());
    if( pnewCodec != NULL )
    {
    printf("03-01 : pnewCodec(%x) not null\n",pnewCodec);
    printf("03-02 : pnewCodec->name().data() : %s\n",pnewCodec->name().data());
    }
    printf("====================================================\n");
    @



  • i got the same problem .did you reslove this?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.