Fixed numerous areas where the default file encoding was used rather than UTF-8 when reading files.