Set encoding.