Character encoding is a system for representing text characters as binary code values. When a file contains four characters such as “tilt,” its size depends on the encoding used to represent those characters. section 7.6
A bit is either 0 or 1, and eight bits make one byte. With ISO-8859-1, each character uses one byte: the letter a is code 97, or 01100001 in binary. Eight bits provide 256 possible values, from 00000000 through 11111111. section 7.6
Representing a short file
The file “tilt” occupies 4 bytes under the simple one-byte-per-character example. A binary dump displays one byte for each character, making the storage representation visible. section 7.6
Encoding standards developed as limited character sets became impractical:
- ASCII uses 7 bits and provides 128 characters, but omits characters such as ü, ö, £, and ¥. section 7.6
- ISO-8859-1 uses 8 bits and expands the range to 256 characters, but still cannot represent every language. section 7.6
- Unicode aims to provide characters for every language, while UTF-8 encodes Unicode characters using one to four bytes. section 7.6
Encoding choices involve a trade-off between simplicity, capacity, and compatibility. Fixed-width encodings make sizes predictable, while UTF-8 uses variable-length representations to support a much larger character set. section 7.6








