20.08.2013, 15:01, "Till Oliver Knoll" <till.oliver.kn...@gmail.com>: > Am 19.08.2013 um 14:29 schrieb Dmitrii Volosnykh > <dmitrii.volosn...@gmail.com>: > >> ... >> >> Here is example code I use: >> >> #include <QtCore/QCoreApplication> >> #include <QtCore/QtDebug> >> #include <QtCore/QFile> >> #include <QtCore/QJsonDocument> >> #include <QtCore/QJsonObject> >> >> int main(int argc, char *argv[]) >> { >> QCoreApplication a(argc, argv); >> >> QJsonObject object; >> const QString& test = QString::fromUtf8("тесто"); >> object[test] = test; >> QJsonDocument document(object); > > This off course assumes that a) your source file is stored in UTF8 (or > Unicode?) as well and most importantly b) that your compiler is actually able > to process UTF8 (Unicode) sources.
UTF8 in string literals does not require compiler ability to process UTF8 sources. It is nothing more than sequence of bytes inside "". -- Regards, Konstantin _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest