This may depend on the charger itself. A mod-square inverter doesn't normally have the high peak voltage that a sinewave inverter has.
If the charger requires the peak voltage of the grid or generator or inverter to be 160 to 170 volts, (the ~peak voltage of 120VAC RMS), then the turns ratio of its transformer could keep the voltage on the 12 volt side from being high enough to charge the battery properly. Other than that, a transformer shouldn't care too much about the waveform. Unless the voltage is for some reason much higher than 120 Volts AC.
boB