  We present a generic scheme to construct corrected trapezoidal rules with
spectral accuracy for integral operators with weakly singular kernels in
arbitrary dimensions. We assume that the kernel factorization of the form,
$K=\alpha\phi+\widetilde{K}$ with smooth $\alpha$ and $\widetilde{K}$, is
available so that the operations on the smooth factors can be performed
accurately on the basis of standard Fourier spectral methods. To achieve high
precision results, our approach utilizes the exact evaluation of the Fourier
coefficients of the radial singularity $\phi$, which can be obtained in
arbitrary dimensions by the singularity isolation/truncation described in this
article. We provide a complete set of formulas for singularities of the type:
$\log(r)$ and $r^{-\nu}$. Convergence analysis shows that the constructed
quadrature rules exhibit almost identical rate of convergence to the
trapezoidal rule applied for non-singular integrands. Especially, for smooth
data, the corrected trapezoidal rules converge super-algebraically.
