Text Encoding Explained: Why Files Show Strange Characters
What UTF-8 and other encodings are, why text sometimes turns into odd symbols, and how to avoid the problem.
Have you ever opened a text file and seen strange symbols like "é" where an accented letter should be? That's an encoding problem, and it's easy to understand.
What is an encoding?
Computers store text as numbers. An encoding is the agreed table that says which number stands for which character. If a file is saved with one table and read with another, characters appear as gibberish.
Common encodings
| Encoding | Notes |
|---|---|
| ASCII | the original, with 128 characters: English letters, digits, punctuation |
| ISO-8859-1 (Latin-1) | adds accented Western European letters |
| Windows-1252 | similar to Latin-1, common in older Windows files |
| UTF-8 | can represent virtually every character, including emoji and all scripts |
| UTF-16 | another Unicode encoding, used in some systems |
Why UTF-8 is the best choice
UTF-8 is now the standard for the web and most software. It covers:
- All the world's writing systems.
- Emoji.
- Symbols and maths.
It also keeps plain English text identical to ASCII, so it's backward compatible.
Symptoms of a mismatch
| You see | Likely cause |
|---|---|
| é shown as é | UTF-8 text read as Latin-1 |
| Question marks or squares | the characters aren't in the encoding used |
| Emoji as odd symbols | the file or font doesn't support them |
How to avoid problems
- Save files as UTF-8 whenever the option is available.
- Use the same encoding for all your text files.
- Be careful with old files, which may be in another encoding.
- If text looks wrong, try reopening the file with a different encoding.
- Use fonts that support the characters you need.
Emoji and encodings
Emoji need a Unicode encoding such as UTF-8. If a file was saved in an older encoding, emoji can't be stored.
A tip for sharing
If you send a text file to someone, UTF-8 gives the best chance it appears correctly on their device.
Why plain text is still simple
Even with encodings, plain text is the simplest and most widely readable format. Choose UTF-8, and your notes will open almost anywhere.
Notepad+ Text Editor
A fast, advanced text editor for notes and code, with emoji support
More about Notepad+ Text Editor
Drafting Emails in a Text Editor First
Why drafting important emails in a separate text editor prevents accidental sends, improves clarity and helps you write calmer messages.
Read article →Keeping a CV in Plain Text for Easy Updates
Maintain a master CV in a plain-text file so you can update it anywhere, tailor it quickly and paste it cleanly into online application forms.
Read article →Keeping a Work Diary for Performance Reviews
Record your achievements, feedback and challenges throughout the year in a simple text file, so performance reviews and promotions are easier to prepare.
Read article →Outlining a Novel in a Text Editor
Use a plain-text outline to plan characters, chapters and plot for a novel — flexible, searchable and easy to rearrange.
Read article →