R
R
Roper2222020-05-01 16:33:11
Character encoding
Roper222, 2020-05-01 16:33:11

Is it possible to read bits in different ways?

Hello, help me please. I don't understand one thing. Here I have UTF-8, there, using a sequence of bytes, you can encode text. But using a sequence of bytes, you can store mp3 files and pictures, and so on. The question is: what sequence of bytes can be read in different ways? That is, there is an encoding that reads byte sequences for pictures, for MP3 files, and a separate encoding for text (like UFT-8)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
1
15432, 2020-05-01
@15432

No, bytes are the same everywhere, but they can be interpreted in different ways! For example, you can open .mp3 with a text editor. Or play "war and peace" as a .wav sound. Another thing is that the result will be nonsense.
You can open any file with some WinHex and see how it actually looks, at the level of individual bytes.

O
Oleg, 2020-05-01
@402d

This is called the data format. A priori one needs to know what the bytes mean. Even an integer can be written in different ways. In graphic formats, it comes to the fact that bits from left to right and vice versa use

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question