Polarizers are widely used to change the polarization of millimeter waves on the electron cyclotron resonance heating and current drive (ECRH and CD) systems. A new method based on the coordinate transformation and the Fourier expansion (the so-called C-method) has been developed for design of polarizers on the HL-2A ECRH and CD systems. This method transforms the grating problem to an eigenvalue problem, making it easy and clear to understand and solve. The comparison between the C-method, the integral method, and the low power test results is presented. It indicates that the C-method can be considered as a rigorous numerical method for the design of polarizers. Finally, two polarizers were designed based on the C-method which can be used together to achieve almost arbitrary polarization.