  We investigated the formation of the Mg II h-k doublet in a weakly magnetized
atmosphere (20-100 G) using a newly developed numerical code for polarized RT
in a plane-parallel geometry, which implements a recent formulation of
partially coherent scattering by polarized multi-term atoms in arbitrary
magnetic field regimes. Our results confirm the importance of partial
redistribution effects in the formation of the Mg II h and k lines, as pointed
out by previous work in the non-magnetic case. We show that the presence of a
magnetic field can produce measurable modifications of the broadband linear
polarization even for relatively small field strengths (~10 G), while the
circular polarization remains well represented by the classical magnetograph
formula. Both these results open an important new window for the weak-field
diagnostics of the upper solar atmosphere.
