  We show that the space of invariants for the Weil representation for
discriminant groups which contain self-dual isotropic subgroups is spanned by
the characteristic functions of the self-dual isotropic subgroups. As an
application, we construct modular units for orthogonal groups in signature
(2,2) using Borcherds products.
