[Interest] Problem with: ICU 52.1 + Qt 5.1.1 + C MySQL Connector 6.0.2 + Windows XP
Thiago Macieira
thiago.macieira at intel.com
Tue Dec 17 19:26:25 CET 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131217/5a857ec4/attachment.sig>
More information about the Interest
mailing list