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

Qt 4.8.3 displays incorectly a number if a name is Arabic

    XMLWordPrintable

Details

    Description

      Hi,

      The QT 4.8.3 needs to display '700-1414 arabic_name' = "700-1414 شسي ". Instead it displays '1414-700 arabic_name' = "شسي 700-1414". The same string was displayed correctly ("700-1414 شسي ") with Qt 4.7.2.

      Is this Qt 4.8.3 bug or a different API needs to be used for 4.8.3? Or may be there was a bug in Qt 4.7.2? If we add an LRM (http://en.wikipedia.org/wiki/Left-to-right_mark) before the number then Qt 4.8.3 displays the digits correctly.

      The problem is seen on Linux 2.6.27 running on ARM. I can not test it on QT 4.8.5. Migration from 4.7.2 to 4..8.3 took a while (updating libraries, header, and moc files) and I don't have time for this.

      Here is the source code to reproduce the issue. Can you let me know if there is a fix for this problem?

      main.cpp

          #include "widget.h"
          #include <QApplication>
           
          int main(int argc, char *argv[])
          {
              QApplication a(argc, argv);
              Widget w;
              w.show();
             
              return a.exec();
          }
      
      

      widget.h

          #ifndef WIDGET_H
          #define WIDGET_H
           
          #include <QLabel>
           
          class Widget : public QLabel
          {
              Q_OBJECT
             
          public:
              Widget(QWidget *parent = 0);
              ~Widget();
          };
           
          #endif // WIDGET_H
      

      widget.cpp

          #include "widget.h"
           
          Widget::Widget(QWidget *parent)
              : QLabel(parent)
          {
              setText(QString::fromUtf8("\u0627\u0644\u062C\u0632\u064A 700-1414"));
          }
           
          Widget::~Widget()
          {
             
          }
      

      Thanks,
      Dusan Mudric.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            dmudric Dusan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes