Set encoding on index and viewport stuff