Okay someone posted another wrong circuit with a diode bridge and all, and i though we should clear the misunderstanding once and for all. The first thing we should realize is that a simple capacitor can't separate the mains from the circuit as a transformer can. There is no galvanic separation, therefore the mains ground position will influence the circuit (flip the switch). Although the output will still have a potential difference of 12V some parts of the circuit will become at mains potential. Furthermore the capacitor can limit the current only in an ideal environment. In reality mains is full of noise and high frequency harmonics, at which the capacitor will appear to have a lot less reactance. At 50Hz and 470nF the reactance is ~6.8k. That's why you need to add a current limiting resistor in series, because a resistor will have equal resistance for all the harmonics. It does dissipate much power though (around 3.5W). This types of circuits are very inefficient, and can sometimes lead to inefficiencies of single digit %. Not to mention they're extremely dangerous. Old vacuum tube TV's sometimes used these circuits, and were often supplied with many fail-safes and protection circuitry to limit the electrocution risk.