set correct language encoding earlier