Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlQuery and umlaut
Forum Updated to NodeBB v4.3 + New Features

QSqlQuery and umlaut

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 2.0k Views 2 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.
  • E Offline
    E Offline
    Erni42
    wrote on last edited by koahnig
    #1

    Hi all,

    just a question feature or bug.
    I have a program with the routine

    qquery.exec(query);
     ui->tableWidget->setItem(ui->tableWidget->rowCount() - 1, 2, new QTableWidgetItem(abfrage->value("start_nr").toString()))
    

    compiling this with qt5.6.2 all umlaute shown correct, compiling with 5.8.x all umlaut and the ß are not displayed correctly. Do I have to set any value in 5.8?

    Thanks,
    Dietmar

    1 Reply Last reply
    0
    • sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on last edited by
      #2

      Hi Erni42,

      can you tell the platform and the db you are using?

      1 Reply Last reply
      0
      • E Offline
        E Offline
        Erni42
        wrote on last edited by
        #3

        Oh, yes sorry.

        Platform is Window 10, Server remote Mysql 5.6.33

        1 Reply Last reply
        0
        • sneubertS Offline
          sneubertS Offline
          sneubert
          wrote on last edited by
          #4

          Maybe it´s an encoding issue. Can you debug out the query result as QByteArray?

          qDebug() << abfrage->value("start_nr").toByteArray();
          
          1 Reply Last reply
          0
          • E Offline
            E Offline
            Erni42
            wrote on last edited by
            #5

            The character is splitted into 4 characters

            "Neth\xC3\x83\xC2\xB6""fel"

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Erni42
              wrote on last edited by
              #6

              compiled with 5.6.x i got
              "Neth\xC3\xB6""fel"

              1 Reply Last reply
              0
              • E Offline
                E Offline
                Erni42
                wrote on last edited by
                #7

                Qt 5.9 alpha delivers also the correct result including the umlaut like ö

                the_T 1 Reply Last reply
                0
                • E Erni42

                  Qt 5.9 alpha delivers also the correct result including the umlaut like ö

                  the_T Offline
                  the_T Offline
                  the_
                  wrote on last edited by
                  #8

                  @Erni42
                  Which encoding have you set in your database / table?

                  -- No support in PM --

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    Erni42
                    wrote on last edited by
                    #9

                    Utf8_General_CI

                    The most anoying point is 5.6 is Wirkung 5.9 too. Just 5.8 returns wrong encoding vor something

                    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