Fix UTF-8 handling when reading locale files