On terça-feira, 17 de dezembro de 2013 15:10:50, Thales Lange wrote:
> 1) With ICU 52.1:  “QTextCode::codecForLocale()” is returning 0x0
> 2) Without ICU 52.1: “QTextCode::codecForLocale()” is return a valid pointer

Hi Thales

Thank you for the information. With an ICU build, codecForLocale() is this:

        textCodecsMutex()->lock();
        codec = QIcuCodec::defaultCodecUnlocked();
        textCodecsMutex()->unlock();

And that function does:
    const char *name = ucnv_getDefaultName();
    c = codecForNameUnlocked(name);

Which in turn calls ucnv_getStandardName and then ucnv_open. 

So we seem to be concluding that ICU is failing to work: either it returns a 
bogus default name from ucnv_getDefaultName, or that name returns bogus data 
for standard name, or the ucnv_open fails.

There's a debug statement if ucnv_open fails:
    UConverter *conv = ucnv_open(standardName, &error);
    if (!conv) {
        qDebug() << "codecForName: ucnv_open failed" << standardName << 
u_errorName(error);
        return 0;
    }

Can you check if that got printed? If it did not get printed, we know it's 
because the failure happened before: ucnv_getStandardName.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to