<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
Are you sure that you just haven't forgotten to set locale codec
before calling qDebug() or forgotten to use ::fromUtf8?<br>
<br>
<font color="#ff0000">
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));<br>
qDebug() <<
QString::fromUtf8("\u0421\u043f\u043e\u0441\u043e\u0431
\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439
\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 DLL \u0432
\u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0435
\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e
\u043f -
\u041d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432");</font><br>
<br>
At least for me it produces right looking output (disclaimer, I
don't know how it should look like...):<br>
<meta name="qrichtext" content="1">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span
style=" font-family:'Monospace'; font-size:9pt;
color:#be1414;">"Способ принудительной загрузки DLL в адресное
пространство п - Низкоуровнев" <br>
<br>
</span><!--EndFragment--></p>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style type="text/css">
p, li { white-space: pre-wrap;</style><br>
re, Jonni<br>
<br>
<br>
On 03/25/2013 02:11 PM, Oleg Linkin wrote:<br>
</div>
<blockquote cite="mid:1924329.yI4tlvgzzE@magog" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="qrichtext" content="1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;">Hello.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;">I got the problem with cyrillic russian
symbols when I try to "qDebug ()" json data with russina
letters. In output there is no any russian letters and in their
places there are gaps.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;">1. This is part of networkreply->readAll
():</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><span style=" font-family:'Monospace';
color:#f04645;">{"item_id":"320043892","resolved_id":"320043892","given_url":"http":\/\/www.rsdn.ru\/forum\/asm\/2729722.flat","given_title":"\u0421\u043f\u043e\u0441\u043e\u0431
\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439
\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 DLL \u0432
\u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0435
\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e
\u043f -
\u041d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432","favorite":"0","status":"0","time_added":"1363782570","time_updated":"1364074862","time_read":"0","time_favorited":"0","sort_id":7,"resolved_title":"\u0421\u043f\u043e\u0441\u043e\u0431
\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439
\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 DLL \u0432
\u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0435
\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e
\u043f","resolved_url":<a class="moz-txt-link-rfc2396E" href="http:\/\/www.rsdn.ru\/forum\/asm\/2729722.flat">"http:\/\/www.rsdn.ru\/forum\/asm\/2729722.flat"</a>,"excerpt":"\u0421\u043f\u0430\u0441\u0438\u0431\u043e
\u0437\u0430 \u043e\u0442\u043a\u043b\u0438\u043a!
\u0421\u0421>>\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e
\u043b\u0438\u0431\u043e
\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c
\u043b\u043e\u0433\u0438\u043a\u0443
\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430
\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e,
\u043b\u0438\u0431\u043e
\u043e\u0442\u043b\u043e\u0436\u0438\u0442\u044c
\u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435
\u043d\u0443\u0436\u043d\u043e\u0439 DLL
(\u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c
\u043a\u0430\u043a
inject.","is_article":"1","is_index":"0","has_video":"0","has_image":"0","word_count":"67"}</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;">2. The same part after generating QVariantmap
via QJson::Parser:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><span style=" font-family:'Monospace';
color:#f04645;">( "320043892" , QVariant(QVariantMap,
QMap(("excerpt", QVariant(QString, " ! >> , DLL (
inject.") ) ( "favorite" , QVariant(QString, "0") ) (
"given_title" , QVariant(QString, " DLL - ") ) ( "given_url" ,
QVariant(QString, <a class="moz-txt-link-rfc2396E" href="http://www.rsdn.ru/forum/asm/2729722.flat">"http://www.rsdn.ru/forum/asm/2729722.flat"</a>)
) ( "has_image" , QVariant(QString, "0") ) ( "has_video" ,
QVariant(QString, "0") ) ( "is_article" , QVariant(QString,
"1") ) ( "is_index" , QVariant(QString, "0") ) ( "item_id" ,
QVariant(QString, "320043892") ) ( "resolved_id" ,
QVariant(QString, "320043892") ) ( "resolved_title" ,
QVariant(QString, " DLL ") ) ( "resolved_url" ,
QVariant(QString, <a class="moz-txt-link-rfc2396E" href="http://www.rsdn.ru/forum/asm/2729722.flat">"http://www.rsdn.ru/forum/asm/2729722.flat"</a>)
) ( "sort_id" , QVariant(qulonglong, 7) ) ( "status" ,
QVariant(QString, "0") ) ( "time_added" , QVariant(QString,
"1363782570") ) ( "time_favorited" , QVariant(QString, "0") )
( "time_read" , QVariant(QString, "0") ) ( "time_updated" ,
QVariant(QString, "1364074862") ) ( "word_count" ,
QVariant(QString, "67") ) ) ) )</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;">3. But when I try to show this strings in
view - russian text exists but it has strange view:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><a class="moz-txt-link-freetext" href="https://lh5.googleusercontent.com/-YMyQqrXkhqA/UU4nhu1sHbI/AAAAAAAABEg/Yx7Cz_kczdg/s808/sailfish_cyrillic_view.png">https://lh5.googleusercontent.com/-YMyQqrXkhqA/UU4nhu1sHbI/AAAAAAAABEg/Yx7Cz_kczdg/s808/sailfish_cyrillic_view.png</a></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><br>
-----------------------------------------<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><br>
-----------------------------------------<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
</blockquote>
<br>
</body>
</html>