Decode mysql binary to normal text

Discussion in 'PHP' started by thesurface, Dec 21, 2014.

  1. #1
    Hello it is possible to decode mysql binary string to normal human readable text?

    Example of mysql binary string:
    ŰNďéĄ>ǐˆž\r7«Ó[ŇN`Ń{

    Mysql is created like this one:
    `info` binary(20) NOT NULL,
     
    thesurface, Dec 21, 2014 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    This depends on how the data was formatted. You might be able to CAST(info as CHAR) to see if it's just a plain binary representation of the data, otherwise you'll need to figure out what kind of function was used to insert the binary data.
     
    zacharooni, Dec 21, 2014 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    You would have to decode it in the same manner that it was encoded or encrypted.

    A binary string is completely meaningless unless you know how the data that is stored was created.
     
    jestep, Dec 22, 2014 IP