Encoding
The rule that maps the bytes in a file to characters. Reading a file with the wrong encoding turns accented letters and symbols into nonsense.
UTF-8 is the common default today. Older files often use other encodings, and nothing inside a plain text file says for certain which one it is.
Where it comes up
- Stray whitespace and invisible charactersTwo values look identical on screen but differ by a trailing space, a non-breaking space, or a hidden character.
See also
- WhitespaceCharacters that take up space without showing a mark: spaces, tabs, line breaks, and less obvious ones such as the non-breaking space.
- ParsingReading text and working out its structure: turning the characters 03/04/2025 into a date, or one line of a file into separate fields.