handle utf8 characters in languages, convert appropriately for #319