Rewiring a 12V charger
The output of this "charger" thing should be isolated from the AC line internally.  There should be no direct connection between the output and either side of the AC line.

Usually these things full wave rectify the AC, chop it up at high frequency thru a transformer, with a opto-isolator providing feedback from the output side to kill the oscillations when the output voltage gets above the setpoint.

In any case, soldering a different connector to the output isn't going to change whether the charger is isolated and safe or not.  If you bought it from a reputable supplier and you can be confident the CE or UL mark on it is real, there is nothing to worry about.