diff --git a/src/app/main.cpp b/src/app/main.cpp index 31e744732..eab0156ee 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -94,6 +94,7 @@ void showSplashScreen(); #ifdef Q_OS_UNIX void adjustFileDescriptorLimit(); +void adjustLocale(); #endif // Main @@ -104,6 +105,7 @@ int main(int argc, char *argv[]) #endif #ifdef Q_OS_UNIX + adjustLocale(); adjustFileDescriptorLimit(); #endif @@ -392,4 +394,12 @@ void adjustFileDescriptorLimit() limit.rlim_cur = limit.rlim_max; setrlimit(RLIMIT_NOFILE, &limit); } + +void adjustLocale() +{ + // specify the default locale just in case if user has not set any other locale + // only `C` locale is available universally without installing locale packages + if (qEnvironmentVariableIsEmpty("LANG")) + qputenv("LANG", "C.UTF-8"); +} #endif