We describe recent perturbative QCD calculations of diffractive J/psi
and open <c(c)over bar> production at HERA and show that they offer a
sensitive probe of the gluon density at small x. We discuss briefly th
e Q(2) and beta dependence of the cross section and show that estimate
s of the higher order corrections indicate a strong enhancement of the
open charm production.