This paper is concerned with uniqueness of solution of the inverse diffraction by problems by a periodic curve with Dirichlet boundary condition in two dimensions. It is proved that the periodic curve can be uniquely determined by the near-field measurement data corresponding to infinitely many incident plane waves with distinct directions at a fixed frequency. Our proof is based on Schiffer’s idea which consists of two ingredients: (i) the total fields for incident plane waves with distinct directions are linearly independent, and (ii) for a fixed wave number there exist only finitely many linearly independent Dirichlet eigenfunctions in a bounded domain or in a closed waveguide under additional assumptions on the waveguide boundary. Based on the Rayleigh expansion, we prove that the phased near-field data can be uniquely determined by the phaseless near-field data in a bounded domain, with the exception of a finite set of incident angles. Such a phase retrieval result leads to a new uniqueness result for the inverse grating diffraction problem with phaseless near-field data at a fixed frequency. Since the incident direction determines the quasi-periodicity of the boundary value problem, our inverse issues are different from the existing results of [F. Hettlich and A. Kirsch, Inverse Problems, 13 (1997), pp. 351–361], where fixed-direction plane waves at multiple frequencies were considered.