Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Latin-1 characters not recognized anymore in QT 5.3 ?

Latin-1 characters not recognized anymore in QT 5.3 ?

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Romu79
    wrote on last edited by
    #1

    Hi,

    I had this code below in Visual 2005 and QT 4.8 :
    @
    QDockWidget* pDockOutput = new QDockWidget(tr("Sortie de la tâche 1"), this);
    @
    I compile it with Visual 2013 and QT 5.3 and the "â" is replaced by a "?" in my DialogBox.
    I tried this to correct but it doesn't work :
    @
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO 8859-1"));
    QString name = "Sortie de la tâche 1";
    QByteArray latin1;
    QByteArray encodedString1 = latin1.append(name.toLatin1());
    QDockWidget* pDockOutput = new QDockWidget(encodedString1, this);
    @
    I tried a lot of différent things : no good :(

    Any idea ?

    Thank U

    Romu

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Try trUtf8(), although it should be obsolete in Qt 5. Qt 5 expects (well, let's put it more strongly: requires) source code to be encoded in UTF-8.

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved