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

QCoreApplication mangles argv

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • Some future release
    • 4.5.0
    • Other
    • None

    Description

      Using: LANG=ru_RU.UTF-8

      Did:

      #include <QCoreApplication> 
      #include <QDebug> 
       
      int main(int argc, char** argv) 
      { 
          for (int i=0; i<argc; ++i) 
              qDebug()<<argv[i]; 
          QCoreApplication app(argc, argv); 
          for (int i=0; i<argc; ++i) 
              qDebug()<<argv[i]; 
          return app.exec(); 
      } 
      

      make && src/test файл
      (I give it cyrillic arg)

      Expected to see:
      src/test
      файл
      src/test
      файл

      Got instead:
      src/test
      файл
      src/test
      Ñайл

      This needs to be fixed or the docs need to explicitly state that QString::

      {from|to}

      Local8Bit mustn't be used before QApplication object creation

      Attachments

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

        Activity

          People

            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes