tl;dr:(1) How to talk to the external world (the encodings of command-line parameters, environment variables, standard streams and the file system). (2) How to read the source code (the encoding of source files). (3) How to represent text internally (the encoding of strings).