Measurement of D ± production in deep inelastic ep scattering with the ZEUS detector at HERA