Set encoding early