[ELI5] Why does Notepad display a wall of garbled text when opening a non-.txt file?

529 views

Every so often, if I open a non-text based document in either Microsoft Word or Notepad, it will open a massive file with an endless wall of completely garbled, gibberish text, most of the characters being either rectangle boxes or characters that can’t normally be typed. What does each of these characters represent? What happens if I insert or delete these characters?

Usually files would refuse to open with an incompatible format. How do these text-processing softwares somehow manage to run virtually any file?

In: 15

13 Answers

Anonymous 0 Comments

Computers have many ways of encoding data. That just means data can be written many different ways.

When you open a non-.txt format file in notepad, it’s not guaranteed that the data in the file is written in letters and numbers as we use them. Instead, the data could be raw binary.

Those square symbols and gibberish are the word processor trying to decode the data into text using one of many text encoding schemes.

The word processor is trying to translate a big, random number into text, but since the data wasn’t meant to be text, it’s like trying to translate Gibberish into English. Occasionally there’ll be something recognizable, but it’s still largely gibberish.

You are viewing 1 out of 13 answers, click here to view all answers.