IntelliJ static code analysis: the easy fixes

Ran the IntellJ inspections static code analysis. These are the
straightforward fixes.
s/encoding/ENCODING