The response of silicon surface-barrier and other semiconductor detectors to heavy ions is complicated by the presence of a pulse-height defect, such that heavy ions produce a smaller pulse height than lighter ions of the same kinetic energy. Based on the results of measurements of this phenomenon with a variety of ions, a new calibration technique for such detectors is proposed. Unlike the widely used calibration technique proposed by Schmitt and co-workers, which assumes the pulse-height response to be linear in both mass and kinetic energy, the present procedure reproduces the observed non-linearities. It is based on separating the energy of the ion into two terms, one of which is strictly proportional to the pulse height and is, in fact, the energy which a light ion, such as an alpha particle, must have to give the same pulse height. The second term is the energy defect of the ion, and is a function of its kinetic energy, mass and atomic number. Applications of the technique to experimental data are presented, including energy and time-of-flight mass measurements of energy-degraded fission fragments, and double-energy measurements of the fissioning systems 235U(n,f) and 252Cf(sf).