In mercury superconducting cuprates synthesized at high pressure, partial carbon substitution on the mercury site occurs when the precursors are not absolutely carbon free. Hg-12(n-1)n samples made from carbonate-containing precursors show lower Tcs and smaller c parameter. A model of the structural arrangement of the CO3-2 groups is proposed from neutron diffraction data and crystal-chemistry considerations. The third oxygen of the oxyanion is situated in the (Hg,C)O∂ layer and hinders the incorporation of extra-oxygen atoms. The (Hg1-xCx)Ba2CuO4+∂ phase diagram shows three different phases, namely HgBa2CuO4+∂, Hg0.5C0.5Ba2CuO4+∂ and CBa2CuO4+∂. The latter two phases are not superconducting due to the insufficient hole concentration on the superconducting layer. Sulphur can also partially replace mercury in Hg1-xSxBa2CuO4+∂ and forms a solid solution up to x=0.15. Neutron diffraction shows that the sulphur atoms arrange as S04-2 oxyanions. The larger S-O distances induce steric limitations to the presence of other sulphate anions in the same mesh.