Cosmic rays (CRs) are thought to be accelerated in supernova remnants (SNRs). The most favorable situation for proving that the main, hadronic CR component is accelerated there is when CRs interact with dense gases, such as molecular clouds (MCs) that surround the SN shock. Here, a new mechanism of spectrum formation in partially ionized gases near SNRs is proposed. Using an analytic model of nonlinear diffusive shock acceleration, we calculate the spectra of protons and estimate the resulting γ-ray emission occurring when the SNR shock approaches an MC. We show that the spectrum develops a break in the TeV range and that its GeV component is suppressed. These modifications to the standard theory occur because of the proximity of the partially ionized MC gas and because of the physics of particle and Alfven wave propagation inside the gas. Possible applications of the new spectra to the recent CANGAROO and HESS observations of the SNR RX J1713.7-3946 are discussed.