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
Bullets or Sentences? Writing Notes You Can Still Understand Next Year
How to write notes that stay clear over time, and when short bullets work better than full sentences.
Read article →Drafting a Blog Post from a Plain-Text Outline
A simple process for planning and writing a post or article in a text editor, from idea to a clean first draft.
Read article →Find and Replace: Tidying Notes and Files in Seconds
How find and replace works, the options to look for and the precautions that stop it from changing more than you intended.
Read article →Text Templates: Reusable Notes You Never Retype
How to create a small set of template files for repeating tasks such as meetings, trips, weekly reviews and reports.
Read article →