[Qt-interest] QTextCodec?

Andre Somers andre at familiesomers.nl
Wed Aug 18 15:15:16 CEST 2010


  Op 18-8-2010 15:06, nobody schreef:
> On 18/08/2010 10:59 PM, Andre Somers wrote:
>>     Op 18-8-2010 14:47, nobody schreef:
>>> Hi,
>>> Anyone know if this function will work without libiconv installed on
>>> win32 QTextCodec::toUnicode() ?
>>>
>>> I can't find any configure option using enable iconv with Qt-4.7 beta2
>>> But this particular function crash at run-time
>>> QTextCodec::codecForName("supported encodings")
>>> The returned codec is zero.
>> Are you sure there is a codec with the name "supported encodings" then?
> Yeah of course it is directly written on the qt4 documentations web page.
> Right under the title "Detailed Description"
> http://doc.qt.nokia.com/4.6/qtextcodec.html
I guess I'm blind then; I don't see a codec listed there with the name 
"supported encodings".
>> Is that in the list you get from QTextCodec::availableCodecs()? Anyway,
>> you should never assume that the pointer you get back from a
>> function like this is valid. Check before derefencing!
> All I can tell is that toUnicode() crashed... For some odd reasons..
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 10168.0x1164]
> 0x0000000002e0870b in ZNK10QTextCodec9toUnicodeERK10QByteArray ()
Question is still: did you check that

QTextCodec::codecForName("supported encodings")

does not return 0?

André




More information about the Qt-interest-old mailing list