ngscopeclient / scopehal

Test and measurement hardware abstraction library and protocol decodes. This is the library only. Most users should use scopehal-apps.
BSD 3-Clause "New" or "Revised" License
190 stars 86 forks source link

Untangle locale-setting code #847

Open d235j opened 7 months ago

d235j commented 7 months ago

At the moment the locale-setting code (in lib/scopehal/Unit.h) uses the C API and does not appear thread-safe on Windows. Additionally, on macOS it seems to not correctly reset the locale on application exit.

Previously there were issues with file interchange due to locale (https://github.com/ngscopeclient/scopehal/issues/494). The OS is supposed to set the application's locale to C on startup, but obviously something isn't right, so this needs to be thoroughly investigated to clean up the API calls and prevent further interchange issues.

azonenberg commented 7 months ago

Conjecture: GTK was doing something with locales in glscopeclient that might no longer be an issue now that we're not using GTK?