[Interest] Support of russian language in QJson-classes
Konstantin Tokarev
annulen at yandex.ru
Tue Aug 20 13:04:10 CEST 2013
20.08.2013, 15:01, "Till Oliver Knoll" <till.oliver.knoll at gmail.com>:
> Am 19.08.2013 um 14:29 schrieb Dmitrii Volosnykh <dmitrii.volosnykh at 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
More information about the Interest
mailing list