mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-27 06:15:45 +00:00
Set LC_ALL to control the locale
LANG specifies the default locale, LC_NUMERIC specifies the locale for that particular category, but LC_ALL overrides all the locale settings. Thus any user with LC_ALL set can still run into locale-related problems. Setting LC_ALL to C avoids any such issue. See locale(7) for details. Signed-off-by: Stephen Kitt <steve@sk2.org>
This commit is contained in:
@@ -159,8 +159,7 @@ bool AsyncCommandExecutor::execute()
|
||||
|
||||
std::unique_ptr<gchar*, decltype(&g_strfreev)> child_env(g_get_environ(), &g_strfreev);
|
||||
if (change_lang) {
|
||||
child_env.reset(g_environ_setenv(child_env.release(), "LANG", "C", TRUE));
|
||||
child_env.reset(g_environ_setenv(child_env.release(), "LC_NUMERIC", "C", TRUE));
|
||||
child_env.reset(g_environ_setenv(child_env.release(), "LC_ALL", "C", TRUE));
|
||||
}
|
||||
std::vector<std::string> envp = Glib::ArrayHandler<std::string>::array_to_vector(child_env.release(),
|
||||
Glib::OWNERSHIP_DEEP);
|
||||
|
||||
Reference in New Issue
Block a user