You have to be very carful with older technology generators and switched mode power supplies and chargers.  Not all are generator tolerant, and tend to go bang if not.  Though I have noticed some of those open frame generators have better manners now.
I'm believe it or not limited on space, and could not cope with anything much bigger than what I have.
I wanted to take advantage of being away for a few days to run some tests to learn about it's winter performance being parked up.
		
		
	 
Wise words above.  There are generators and there are generators 

   I think the 'Inverter Generators' are really the only ones you would want to use to feed a battery charger.  The cheap basic generators are really only meant for site power tools where there is nothing to really go wrong if the power fluctuates.
I have the Briggs-Straton P2200  (1700W/2200W Peak) Inverter-Generator and something I did check before I plugged a charger into it was the output quality  (voltage level and sine wave frequency & smoothness) and it was virtually the same as the mains, which I was impressed with.
I happened to watch a youtube video the other day of someone (I think it was 'hobotech'?) checking a generator output and he put his meter on the 12V output, which looked good at around 12.4V or something.  But.... he then checked when the generator had a load on it and the 12V output went upto 19V!  And this, IIRC, was a brand new budget Generator.