Midrapidity charge distribution in peripheral heavy ion collisions