I agree with you that it's unfortunate that they do rely on a global state, but still useful when dealing with the execution encoding. maybe glibc can provide the same functions with an additional locale param,
I'm sure that would be useful to c++ implementations.