It depends what you mean by dirty. Capacitor-excited generators tend to produce a distorted waveform especially with extreme load pf. But that isn't necessarily harmful and is unlikely to damage your charger. Most likely, the charger is based on a straightforward switched-mode power supply that rectifies the incoming mains, in which case the genny output can be as nasty as anything without causing harm or affecting the performance of the charger. Old ferroresonant chargers were touchy about waveform annd frequency but you describe it as digital.
If by dirty you mean unstable, and self-regulating generators without electronic AVR can be a bit wide on their voltage tolerance, then as Pete says you could post-regulate with a voltage stabiliser. You can't do much about the frequency regulation, and some cheap portables are rather poorly governed, but again, if the charger is SMPS based it's probably OK up to 254V and will accept a wide range of frequencies. So as long as you don't add lots of capacitive load that makes the genny over-excite, or set the governor too far off the mark, it's probably OK.