Every call would need to set a local though?
To avoid UB, yes. Note that it can be made once in a scope somewhere.
There’s precedent for setting the locale, in vtkXMLReader/Writer and several other places in VTK that deal with streams:
this->Stream->imbue(std::locale::classic());
In that case, the problem was ,
vs .
in decimal strings, not UB, but it’s the same basic annoyance.