Eitan Jacobs
Eitan Jacobs

Reputation: 5

Dictionary for decode text information

I am trying to understand the proprietary format of the file. text files that including lines like

5BBE00008Dyn5A3F00004olgaDD4C00005FelixB3F900007JuanitaE66E00005JuanaD1A900007Timothy5BBE00004Cara 17405BBE0000A0467674021B

this is information inserted in the file:

How do I decode the Name field from this type of data(hex and string)?

Upvotes: 0

Views: 128

Answers (1)

Jim Mischel
Jim Mischel

Reputation: 134065

I suspect that the hex digits before the length field are record identifiers. You have:

5BBE00008Dyn5A3F00004olgaDD4C00005FelixB3F900007JuanitaE66E00005JuanaD1A900007Timothy5BBE00004Cara 17405BBE0000A0467674021B

Or, viewed another way:

5BBE0000 8 Dyn
5A3F0000 4 olga
DD4C0000 5 Felix
B3F90000 7 Juanita
E66E0000 5 Juana
D1A90000 7 Timothy
5BBE0000 4 Cara 
1740
5BBE0000 A 0467674021
B

Somebody else pointed out that the single digit between the hex characters and the string looks like a length byte. And that works for all but the first line above, Dyn.

Note, however, that the three lines that I've marked above all have the hex bytes "5BBE0000", and those are the exact values you're looking for.

Now, as to the meaning of the "1740", I don't know. And why the first line has a length value of 8 rather than 3, I don't know. I would need a larger sample of the file and quite a bit more time to examine it. But this should at least get you started . . .

It bothers me that what we're calling the length is only one hex digit. That would allow a max string length of only 16 characters. It's possible that the lengths above are actually two hex digits. But that would make what I'm calling the record identifier only 7 hex digits long, which would be weird. It's possible the parsing is something like:

5BBE 0 000A

    or

5BBE 0 00 0A

Again, it's hard to say without looking at more of the file.

Upvotes: 2

Related Questions