Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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



  • 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.



  • 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?



  • 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...


Log in to reply