diff --git a/cmdline/mingw.c b/cmdline/mingw.c index 64e35ec5..747cae9f 100644 --- a/cmdline/mingw.c +++ b/cmdline/mingw.c @@ -177,6 +177,9 @@ void os_init(int opt) } exedir_init(); + + /* set LC_ALL=C to make smartctl ignoring the locale when printing info */ + _wputenv_s(L"LC_ALL", L"C"); } void os_done(void) diff --git a/cmdline/unix.c b/cmdline/unix.c index 7343da0e..8cfc2601 100644 --- a/cmdline/unix.c +++ b/cmdline/unix.c @@ -2404,6 +2404,9 @@ void os_init(int opt) } #endif + /* set LC_ALL=C to make smartctl ignoring the locale when printing info */ + setenv("LC_ALL", "C", 1); + (void)opt; }