Brazil's former leader, Jair Bolsonaro, is formally charged with attempting a coup to stay in office after losing the 2022 election.