5 ms·
Well, you can replace setlocale() with your own setlocale that uses dlsym() to look up the "real" set locale, and your setlocale can just call the real setlocal
by smcameron 5y ago
Well, you can replace setlocale() with your own setlocale that uses dlsym() to look up the "real" set locale, and your setlocale can just call the real setlocale with params (LC_ALL, "C").
That turns it off pretty well. Even if other libs call setlocale (looking at you, gtk), they'll get your version.
like so: https://github.com/smcameron/space-nerds-in-space/blob/master/c-is-the-locale.c#L46 https://github.com/smcameron/space-nerds-in-space/blob/maste...