Changeset 350 for trunk/src


Ignore:
Timestamp:
Nov 26, 2009, 12:56:10 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib/codec: Make sure '?' is used to replace non-convertible characters by the "System" codec on OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/codecs/qtextcodec.cpp

    r349 r350  
    421421    // create the conversion object for the process code page that performs
    422422    // substitution of invalid characters with '?'
    423     UniCreateUconvObject((UniChar *)L"@sub=yes", &uoSubYes);
     423    UniCreateUconvObject((UniChar *)L"@sub=yes,subchar=\\x3F,subuni=\\x003F",
     424                         &uoSubYes);
     425    Q_ASSERT(uoSubYes);
     426
    424427    // same as above but doesn't perform substitution
    425428    UniCreateUconvObject((UniChar *)L"@sub=no", &uoSubNo);
     429
    426430}
    427431
     
    450454    if (state && (state->flags & ConvertInvalidToNull))
    451455        uo = uoSubNo;
    452     Q_ASSERT(uo);
    453     if (!uo)
    454         return res;
    455456
    456457    int remainingChars = 0;
     
    547548    if (state && (state->flags & ConvertInvalidToNull))
    548549        uo = uoSubNo;
    549     Q_ASSERT(uo);
    550     if (!uo)
    551         return res;
    552550
    553551    const UniChar *ucPtr = reinterpret_cast<const UniChar *>(uchars);
Note: See TracChangeset for help on using the changeset viewer.