Local structure and electronic-charge distribution at the rare-earth site of compounds (Gd1-xRx)2CuO4, R=Pr, Nd, Sm, and Eu.