loolwsd/LOOLWSD.cpp | 7 +++++++ 1 file changed, 7 insertions(+) New commits: commit 7e78f3f0c611c5bb09a995bc149cc9ec0097813d Author: Tor Lillqvist <t...@collabora.com> Date: Tue Oct 13 20:05:42 2015 +0300
bugs.ccu#1248: If locale is C, set it to en_US.utf8 diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index bb83728..ac36945 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -41,6 +41,7 @@ DEALINGS IN THE SOFTWARE. // number of child processes, each which handles a viewing (editing) session for one document. #include <errno.h> +#include <locale.h> #include <pwd.h> #include <unistd.h> @@ -1070,6 +1071,12 @@ void LOOLWSD::startupDesktop(int nDesktops) int LOOLWSD::main(const std::vector<std::string>& args) { +#ifdef __linux + char *locale = setlocale(LC_ALL, NULL); + if (locale == NULL || std::strcmp(locale, "C") == 0) + setlocale(LC_ALL, "en_US.utf8"); +#endif + if (access(cache.c_str(), R_OK | W_OK | X_OK) != 0) { std::cout << "Unable to access " << cache << _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits