Target dependence of charge distributions in spallation reactions of medium-mass nuclei with 12 GeV protons