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

QTextCodec::codecForName("System") returns NULL in windows when compiled with ICU

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.11.2
    • None
    • mingw64, windows 10 64bit
    • Windows

      I have compiled Qt for windows 64 in mingw64 with ICU support.

      Attempting then to use "System" codec in QTextCodec::codecForName ("System"), returns null.

      However, using: QTextCodec::codecForLocale(); returns codec "windows-1252"

      Codewise:

       QTextCodec * d1 = QTextCodec::codecForName ("System");
       qDebug("%s", d1 ? qPrintable(d1->name()) : "<null>"); // currently prints "<null>"
       
       QTextCodec * d2 = QTextCodec::codecForLocale();
       qDebug("%s", d2 ? qPrintable(d2->name()) : "<null>"); // currently prints "windows-1252"
      

       
      I would expect both to be the same? and at least not NULL, for the System.

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

            thiago Thiago Macieira
            lostbard John Donoghue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes