Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixes #1526 The default locale in a C program is the "C" locale ( POSIX https://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html , C89 standard ), which we want for string-number formatting and parsing gtk ( https://gitlab.gnome.org/GNOME/gtk/-/blob/a274a5ff4b2a2f9cf9731cdddbb456a0758fcbcc/gtk/gtkmain.c#L435 ) and Qt ( 5 https://codebrowser.dev/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp.html#597 , 6 https://codebrowser.dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp.html#613 ) set the locale from the environment variables instead. (by passing "" as the locale, cf `setlocale`) This PR sets the locale for `LC_NUMERIC` back to "C" with `setlocale` after initializing gtk/Qt I tested this with gtk, saw no problem in the GUI with a rom named `/home/dragorn421/Desktop/c'est la fête/rom de noël __ やあ!.z64` Qt codepath is not tested
- Loading branch information