Binary for text

Asked

Viewed 179 times

0

I’m trying to read a binary value from a table, but I can’t get what I want. On the moon, is there any way to convert binary content to text? mysql database. I’m trying the following command:

"SELECT `itemtype`, `count`, `attributes` FROM `player_depotitems` WHERE `player_id` = 1405;"

But in Attributes, in string, returns something like

  • 1

    Enter the code of what you have already done or try [Edit] your question to give more details about what you want. See if this helps you http://codea.io/talk/discussion/1130/bstring-lua-a-utility-to-convert-binary-file-to-lua-strings/p1

  • I haven’t really done anything, I have no idea how to start.

  • Bigown, thanks, but I couldn’t get anything out. It’s like, in the database, it says the item is [BLOB], that’s binary, right? I want to read this.

  • Already improved, we already know you want to read a database. Which database are you using? It would be interesting [Dit] the question to put this information and how is the table. See these libraries http://lua-users.org/wiki/DatabaseAccess And see examples http://www.tutorialspoint.com/lua_database_access.htm

  • I already have the library. From what I read, blob stores the data in binary table form.

  • Then maybe it’s not even a problem to solve in language. The problem is you understand what you have in this field attributes. This symbol means something. There is probably some documentation about the contents of this field. A string has information encoded somehow. You need to understand how it is and how (if you can) decode it, or you need to transform it into something more understandable. Maybe it’s not even, maybe it doesn’t need to. Maybe it’s just a matter of knowing what each stored information means. Tell us more about this field.

  • Well, this field basically stores text.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.