Qt Forum

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

    How to convert bytearray of 64 bit to readable form of data

    General and Desktop
    3
    3
    1626
    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.
    • I
      Indrajeet last edited by

      Hi All

      I have following data which

      UEsDBBQAAAAIAKtGLEAhtt64Xy8AAHWpAgBMAGYAU3ltcGhvbnlQbHVzL3Byb2plY3RzL0lFQzYx

      I tried to convert it as shown below but still I m getting the same format.

      @QByteArray text = QByteArray::fromHex("UEsDBBQAAAAIAKtGLEAhtt64Xy8AAHWpAgBMAGYAU3ltcGhvbnlQbHVzL3Byb2plY3RzL0lFQzYx");
      text.data(); @

      How to resolve this.

      1 Reply Last reply Reply Quote 0
      • L
        lgeyer last edited by

        You know that <code>UEsDBBQAAAAIA...</code> is no valid hex by any means, do you?

        Where does this data come from? What should it represent? Is it possible that you've meant Base64 and <code>QByteArray::fromBase64()</code>, not 64 bit?

        1 Reply Last reply Reply Quote 0
        • B
          bu7ch3r last edited by

          A hex string should have only capitals characters from A to F in your code there is U, K ...
          Indeed Lukas is base 64:
          PK����«F,@!¶Þ¸_/��u©�L�f�SymphonyPlus/projects/IEC61. Anyway i think it's not coded right...
          text.data() must also be converted to an utf format or something...

          for(int i = 200; i > 0;)
          try
          {
          //do something
          }
          catch(...)
          {
          i--;//try again
          }

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