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

Doc: qPrintable() doesn't work with qDebug(), qWarning(), or qFatail()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.3.0 RC1
    • 4.8.5, 5.1.0
    • None
    • Windows 7 (Japanese Edition)
      Qt 5.1.0 (msvc2012, x86_64) or Qt 4.8.5 (msvc2010, x86)
    • 71c6fdf871d6a66c85a7618ec4ced25cf2bb9b5d

    Description

      The documentation of qPrintable() shows example with qWarning().

      qWarning("%s: %s", qPrintable(key), qPrintable(value));

      But, qWarning expects string for %s is utf-8.
      qPrintable() returns locale string.
      So if locale codec isn't utf-8, qWarning() prints broken string.

      ex. Japanese Windows codec is Shift_JIS.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            asaki Takumi ASAKI
            asaki Takumi ASAKI
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes