I strongly suspect that won't work, because calling setlocale() at all changes things in a way that setlocale(oldlocale) won't restore. I believe (though I can't prove it right now) that there's no way to return to the state of "I never called setlocale at all".
I strongly suspect that won't work, because calling setlocale() at all changes things in a way that setlocale( oldlocale) won't restore. I believe (though I can't prove it right now) that there's no way to return to the state of "I never called setlocale at all".