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. Convert QByteArray to Unicode data

Convert QByteArray to Unicode data

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.3k Views 1 Watching
  • 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.
  • W Offline
    W Offline
    William.Tran
    wrote on last edited by
    #1

    Hi All,

    I am working on openssl to decrypt some data. But after i decrypted the content i receive a QByteArray data such as:

    A8\x81\xD1\xC6/\x9A\xF2\xA4\xCA\xB6z\xED\xEF\x0E\xDF\xEF\xAF\xB8\xEA\x03\xAFne\xEF\xFD\xBE\x1D\xD9\x12\xEEz\xCC\xBD\x8B\xDC\x9A\xB1I\xEC\x16\x1D\xAA\xD9R\xBC\xAD\xDA\x8C\xF5\xAD\xEE\xD6\n\xEF\xDF\x8AY\xCB\xBC>\xBD\xC0_o\xBFm\xA5\x8A\xCA\xF6\x01\xAD\xE6\xB5\x0E\x9D\xC9\xFA\xC0\xED""b\x8Dp\xFE\xDC\xFA\xA6\xCD\xD0\xAA\xE5\xEEV\x1B\xBC\xE4\xA3$\xC5?\x9Fq\xB1\xC8\xF6=\xC2\xA2\x01-

    Do you know any way to convert this QByteArray to QByteArray contains Unicode?

    Many thanks.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Depends on what the bytearray actually contains but I'd say: http://doc.qt.io/qt-5/qstring.html#fromUtf8-1

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      1

      • Login

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