Observations of mercury lines in the HgMn stars χ Lupi and HR 7775 made with the Hubble Space Telescope Goddard High Resolution Spectrograph are presented and analyzed. In χ Lupi we find that all observed lines are consistent with the same isotopic mixture (essentially pure 204Hg). Strong ionization anomalies are present, with UV Hg I lines being too weak and Hg III lines too strong for the abundance derived from lines of the majority ionization state, Hg II. Observations of mercury in HR 7775 show less extreme isotope and ionization anomalies. We find that the ionization anomaly in the Hg I resonance lines can be plausibly explained as a non-LTE effect, but the same non-LTE calculations show that the Hg III ionization anomaly in χ Lupi cannot be explained in this way. Radiative force calculations show that the observed mercury abundance cannot be supported in the atmosphere by the radiative forces alone. We suggest that weak mixing brings mercury into the line-forming region from below the photosphere, while a wind of order 10-14 Msolar yr-1 supports a cloud of Hg III at very small optical depths.