Steplike discontinuities in Bose-Einstein condensates and Hawking radiation: Dispersion effects