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. Regarding String encoding

Regarding String encoding

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 5 Posters 1.3k Views
  • 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 Offline
    S Offline
    sonulohani
    wrote on last edited by
    #1

    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 JKSHJ 2 Replies Last reply
    0
    • S sonulohani

      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 Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

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

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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
        0
        • S sonulohani

          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?

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @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
          2
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            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
            0

            • Login

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