also specify locale when setting encoding