Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-46196

qDebug() output for Utf8

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.5.0 Beta
    • Core: Other
    • None
    • Kubuntu 15.04 x64
      Qt 5.5.0 beta opensource linux x64
      gcc 4.9.2
      Qt Creator 3.4.0

    Description

      Wrong debug output for utf8-string

      example

      #include <QDebug>
      
      int main()
      {
          qDebug() << "test1" << "\u0410\u041D\u0422\u0410\u0420\u041A\u0422\u0418\u041A\u0410";
          QString str("\u0410\u041D\u0422\u0410\u0420\u041A\u0422\u0418\u041A\u0410");
          qDebug() << "test2" << str;
          qDebug() << "test3" << QString::fromUtf8("\u0410\u041D\u0422\u0410\u0420\u041A\u0422\u0418\u041A\u0410");
      
          return 0;
      }
      

      Qt 5.4.1 output:

      test1 АНТАРКТИКА
      test2 "АНТАРКТИКА"
      test3 "АНТАРКТИКА"
      

      Qt 5.5.0 beta output:

      test1 АНТАРКТИКА
      test2 "\u0410\u041D\u0422\u0410\u0420\u041A\u0422\u0418\u041A\u0410"
      test3 "\u0410\u041D\u0422\u0410\u0420\u041A\u0422\u0418\u041A\u0410"
      

      Attachments

        1. qdebug541.png
          qdebug541.png
          16 kB
        2. qdebug550.png
          qdebug550.png
          19 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            spise Andrew Sposobin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes