A numerical method for solving the two-dimensional edge-type scattering problems is presented. The method is basically the mode-matching method with a smoothing procedure which has been known as a numerical technique for the problems with smooth scatterers. It is made clear that the method with the smoothing procedure can be applied also to the edge-type problems when it is accompanied by an appropriate transformation of the coordinate variables along the contour of the scatterer. Mathematical theory of the method with the variable transformation is stated, and the algorithm for numerical computation is derived. The problem of a rectangular cylinder is analyzed to show the effectiveness of the present method.