Charge transfer in heavy-ion collisions at relativistic velocities