  The ability to subtract foreground contamination from low-frequency
observations is crucial to reveal the underlying 21 cm signal. The traditional
line-of-sight methods can deal with the removal of diffuse emission and
unresolved point sources, but not bright point sources. In this paper, we
introduce a foreground cleaning technique in Fourier space, which allows us to
handle all such foregrounds simultaneously and thus sidestep any special
treatments to bright point sources. Its feasibility is tested with a simulated
data cube for the 21 CentiMeter Array experiment. This data cube includes more
realistic models for the 21 cm signal, continuum foregrounds, detector noise
and frequency-dependent instrumental response. We find that a combination of
two weighting schemes can be used to protect the frequency coherence of
foregrounds: the uniform weighting in the uv plane and the inverse-variance
weighting in the spectral fitting. The visibility spectrum is therefore well
approximated by a quartic polynomial along the line of sight. With this method,
we demonstrate that the huge foreground contamination can be cleaned out
effectively with residuals on the order of \sim10 mK, while the spectrally
smooth component of the cosmological signal is also removed, bringing about
systematic underestimate in the extracted power spectrum primarily on large
scales.
