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. How to convert bytearray of 64 bit to readable form of data

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.8k 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.
  • I Offline
    I Offline
    Indrajeet
    wrote on last edited by
    #1

    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
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      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
      0
      • B Offline
        B Offline
        bu7ch3r
        wrote on last edited by
        #3

        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
        0

        • Login

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