Stopping power and effective charge of heavy ions in solids