Thanks, I thought I'd better give some context in the way the JSON is used. I have tried converting raw back to a const char* and using QString::fromUtf8 but that doesn't work either.
As you can see the QString does contain \u00e9, I guess what is going on here would be like if "\n" was treat as two separate bytes and printed as '\' 'n'.
struct JSONProcessor : public RPCRequest::Processor
{
virtual QVariant process
( const QString
& raw
) {
// This is what raw looks like
// "{\"data\":[{\"id\":\"535666\",\"readable\":true,\"title\":\"B\u00e9linda\"}]}";
//this doesn't work
//qDebug() << QString::fromUtf8(raw);
return someProcessing( raw );
}
};
struct JSONProcessor : public RPCRequest::Processor
{
virtual QVariant process( const QString& raw )
{
// This is what raw looks like
// "{\"data\":[{\"id\":\"535666\",\"readable\":true,\"title\":\"B\u00e9linda\"}]}";
//this doesn't work
//qDebug() << QString::fromUtf8(raw);
return someProcessing( raw );
}
};
To copy to clipboard, switch view to plain text mode
Bookmarks