[Development] Backwards compatibiltiy break in Qt 5.5

Konstantin Ritt ritt.ks at gmail.com
Mon Jul 27 10:44:05 CEST 2015


My first instinct was suggesting MS to support Unicode in their console...
but then I tried to reproduce the described issue on OS X and succeeded.

qDebug() << "this is сообщение на русском";

which I'd expect to be treated like a byte array, gives me
this is сообщение на русском

though

qDebug() << QString::fromUtf8("this is сообщение на русском");

gives me

"this is \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435
\u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C"


A bit unexpected, isn't it?


Regards,
Konstantin

2015-07-27 12:20 GMT+03:00 Marc Mutz <marc.mutz at kdab.com>:

> On Monday 27 July 2015 00:25:18 NIkolai Marchenko wrote:
> > (I am not entirely sure why I haven't received at least a notification of
> > why this post has not appeared the first time I tried to send it, so here
> > we go again. Btw, it was Thiago Macieira himself who actually suggested I
> > mail this list)
> >
> >
> > Hi! We (Russian Qt community) have a situation we could not resolve with
> > Thiago Macieira in bug tracker, so have to ask for Chief Maintainer's
> > attention.
> > The bug in question is there:
> > https://bugreports.qt.io/browse/QTBUG-47316
> >
> > In version 5.5 Thiago Macieira introduced a compatibility break with
> older
> > qt versions.
> > This break has come in the form of completely changing the way qDebug()
> > prints non-english characters to console.
>
> I don't think qDebug() should guarantee any output, but your position might
> become a relevant one if logging output also changed. That is something
> that
> we shoudn't change, and since IIIRC, qDebug and logging use the same
> stream,
> you may have a point here.
>
> Just my 2ct,
> Marc
>
> --
> Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
> KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
> Tel: +49-30-521325470
> KDAB - The Qt Experts
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150727/81e391b4/attachment.html>


More information about the Development mailing list