Static charged perfect fluid spheres in general relativity