Equilibrium of a static charged perfect fluid sphere