Why do some files look like gibberish if opened in the wrong encoding?
General knowledgeAsked by Anonymous23 Oct 2026, 11:21 AM ISTUpdated
In one line
If you open a file with the wrong encoding, the computer shows the wrong letters, so it looks like gibberish.
The rule
"A file’s encoding is the way it turns letters and symbols into numbers. If you use the wrong code to read it, you get the wrong letters."
Let's understand it simply
Imagine you write a secret message using a code where A=1, B=2, and so on. If your friend tries to read it thinking A=10, B=11, the message will not make sense. Computers do something similar. They turn every letter, symbol, or emoji into numbers using a system called encoding (a way to match letters and numbers). If you use the wrong system to read those numbers, you get the wrong letters—so the file looks like nonsense.
Same file, different encoding
Right encoding
Wrong encoding
Hindi text file
नमस्ते
èèèèè
Emoji file
😊
😊
How it works
When you save a file, the computer turns each letter into a number using an encoding (like UTF-8 or ASCII).
The file stores these numbers, not the letters themselves.
When you open the file, the computer needs to know which encoding was used.
If it uses the wrong encoding, it matches the numbers to the wrong letters or symbols.
This is why you see strange symbols, question marks, or random letters—gibberish.
How encoding works
Write text: 'नमस्ते'
Save as numbers using UTF-8
Open file with UTF-8: shows 'नमस्ते'
Open file with ASCII: shows gibberish
The story behind it
Early computers only supported English letters, so they used a simple encoding called ASCII. But the world has many languages and symbols. New encodings like UTF-8 and UTF-16 were made to support Hindi, Tamil, emojis, and more. Now, if you open a Hindi file in an old English-only encoding, it cannot show the right letters.
Where you see it in real life
Opening a Hindi text file in Notepad → If Notepad uses "ANSI" instead of "UTF-8", Hindi letters become boxes or question marks.
Emails with special characters → If the email app guesses the wrong encoding, you see weird symbols instead of ₹ or é.
Websites with wrong encoding → Sometimes, a website shows random symbols because the browser guessed the wrong encoding.
CSV files from Excel → If you save a file in one encoding and open it in another, names with accents or Hindi letters get messed up.
Why it matters
Needed for reading files in Indian languages, emojis, or special symbols.
Important for programmers, writers, and anyone sharing files across computers.
Used in websites, emails, and apps—wrong encoding can break important data.
Questions about encoding appear in computer science exams and interviews.
Common mistakes
Thinking all files use the same encoding. (They don’t—always check!)
Believing gibberish means the file is corrupted. (It’s usually just the wrong encoding.)
Ignoring encoding when saving or sharing files with non-English text.
Remember it
If you see gibberish, try changing the encoding—most times, the real text will appear!
Check yourself
What is encoding in a computer file?
It is the way letters and symbols are turned into numbers.
Why do Hindi letters sometimes appear as boxes or question marks?
Because the file was opened with the wrong encoding.
How can you fix a file that looks like gibberish?
Try opening it with a different encoding (like UTF-8).
Why does using the wrong encoding show the wrong letters?
Because the computer matches numbers to the wrong symbols if the encoding is not correct.
Quick recap
Encoding is how computers turn text into numbers.
Wrong encoding means wrong letters—gibberish appears.
Different languages and symbols need different encodings.
You can fix gibberish by choosing the right encoding.