Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Regarding String encoding

    General and Desktop
    5
    5
    808
    Loading More Posts
    • 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.
    • S
      sonulohani last edited by

      Hi,

      I am working on one migration project from Qt4 to Qt5 where in Qt4 i am getting the string correctly however in Qt5 i can see some encoded character like "\u0006", "\u0000x\u0084\u009DB" in the returened string. Could you please tell me how to remove or suppress those characters?

      E JKSH 2 Replies Last reply Reply Quote 0
      • E
        Eeli K @sonulohani last edited by

        @sonulohani Can you give a minimal self-contained example project where it happens?

        1 Reply Last reply Reply Quote 1
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          What are you using that shows these characters ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • JKSH
            JKSH Moderators @sonulohani last edited by

            @sonulohani said in Regarding String encoding:

            "\u0006", "\u0000x\u0084\u009"

            These are non-printable characters that your code has entered into your string. Qt 4's qDebug() does not show them, but they are still there. Are you sure you want these in your string?

            Anyway, if you want to hide the non-printable characters in Qt 5, you can replace "qDebug()" with "qDebug().noquote()". See https://bugreports.qt.io/browse/QTBUG-47316

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply Reply Quote 2
            • dheerendra
              dheerendra Qt Champions 2022 last edited by

              In addition to previous posts, you are getting these chats on screen. Do u see a issue with string when manipulate or compare etc ? Can you give code snippet to show string is actually not the intended one ? Again don't get misled by debug print.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              1 Reply Last reply Reply Quote 0
              • First post
                Last post