The interaction of ion beams with insulators leads to charging-up phenomena, which at present are under investigation in connection with guiding phenomena in nanocapillaries with possible application in nanofocused beams. We studied the charging dynamics of insulating foil targets [Mylar, polypropylene (PP)] irradiated with swift ion beams (C, O, Ag, and Xe at 40, 23, 40, and 30 MeV/u, respectively) via the measurement of the slowing down of fast binary-encounter electrons. Also, sandwich targets (Mylar covered with a thin Au layer on both surfaces) and Mylar with Au on only one surface were used. Fast-electron spectra were measured by the time-of-flight method at the superconducting cyclotron of Laboratori Nazionali del Sud (LNS) Catania. The charge buildup leads to target-material-dependent potentials of the order of 6.0 kV for Mylar and 2.8 kV for PP. The sandwich targets, surprisingly, show the same behavior as the insulating targets, whereas a single Au layer on the electron and ion exit side strongly suppresses the charging phenomenon. The accumulated number of projectiles needed for charging up is inversely proportional to electronic energy loss. Thus, the charging up is directly related to emission of secondary electrons.