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

523 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

Let’s pretend you’re a student who has some exams coming up, but you didn’t have time to study for them and will surely fail. So, you decide to… get some help from your fellow classmates.

Your History class collectively comes up with a system to communicate with each other during the multiple-choice exam: one cough is A, two coughs is B, three coughs is C, and four coughs is D.

Everyone takes the exam, and with everyone’s cooperation, the class collectively shares their answers during the exam and everyone passes with flying colors.

Next week, your meet up with your Biology class to discuss how you’re going to pass the Biology exam. “Last week, we came up with a system of coughs to communicate answers with each other”, they say. That’s great, you already know a coughing system, so you’re set!

So you enter the Biology exam and listen to everyone’s coughs. But sometimes someone coughs five or six times, sometimes someone clear their throat, and it doesn’t really make sense to you. You do your best with the coughing system you learned with your History class. Some of the answers don’t end up making sense, but you submit the exam anyway.

You get the exam back with a big fat F-.

What happened? Well, the Biology class’ system of coughs was clearly different than the History class’ system of coughs. Since you tried to interpret the Biology class’ coughs using the system of coughs that your History class decided upon, all your answers were gibberish and completely wrong.

Computers work the same way: all files are just a bunch of zeroes and ones. The different file types, like .txt, .doc, .xls, .jpg, .mp3, are all different systems to interpret those zeroes and ones as some other kind of data, like text, spreadsheets, images, or sound.

Notepad only knows how to interpret the system of zeroes and ones for .txt files and turn that into text. If you give it a .mp3 file, it will try to interpret the .mp3 file’s zeroes and ones as a .txt file, which is sort of like trying to listen to the Biology class talk about exam answers with their own cough system, but you only know the History class’ cough system. It’s going to be complete gibberish.

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