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
Line Endings Explained: LF, CRLF and Why They Matter
Why text files from different systems sometimes look wrong, what line endings are, and how to keep your files tidy.
Read article →Markdown Basics: Formatting Notes Using Only Plain Text
A short introduction to Markdown, a simple way to add headings, lists and emphasis to plain-text notes, with examples you can type on any text editor.
Read article →Quick Lists That Work: Shopping, Packing and Errands
How to write short, practical lists in a text editor so they're quick to make, easy to scan and simple to reuse.
Read article →Writing a First Draft in Plain Text and Why It Helps
How writing without formatting can speed up drafting, reduce distraction and make editing easier.
Read article →