Fix tests encoding