Question

How I can export from library function UTF8 encoded string?

    extern "C" __declspec(dllexport) QString Test()
{
    QString tmp = "日本";
    return tmp;
}
Was it helpful?

Solution

QTextCodec::setCodecForCStrings( QTextCodec::codecForName("utf8") );

helped.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top