How to interpret binary content, . dat?

Asked

Viewed 209 times

0

I need to interpret files .dat, for example. I suppose this is the content of it:

³Å¸ÎÔ|,

which would be equivalent to "Davis" as a text.

In Javascript, using XMLHttpRequest for a file . dat of these should answer with the text "Davis", but he does not interpret this.

How can I interpret this complex content with my code in steps?

1 answer

3


There is no way without knowing which encoding was used to generate this file.

.dat is usually used to say that this is a binary file in a format that only the program that created it understands.

This type of file has been falling into disuse in favor of self-descriptive alternatives, in order to separate the representation of the data from the program that uses the data. You probably know XML and JSON-they have arisen to solve this type of problem.

The way now is for you to search for the documentation provided by those who are giving you this data to understand how they are structured before proceeding.

  • I was just trying to understand the form of the data by the . dat editor I was using in tests. If you hadn’t answered I couldn’t try to continue.

Browser other questions tagged

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