wsd/LOOLWSD.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit 3bb885ab369f6850c4fb9baf155b0bd0dc566126 Author: Michael Meeks <michael.me...@collabora.com> Date: Thu Mar 15 19:17:17 2018 +0000 Help OSL's nlsupport with a UTF-8 locale for everyone. Change-Id: I98557e3134b436b6360129dfd6d16bba811cd864 Reviewed-on: https://gerrit.libreoffice.org/51394 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 89f698db9..2118a0dd2 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2703,11 +2703,9 @@ int LOOLWSD::innerMain() initializeSSL(); - char* locale = setlocale(LC_ALL, nullptr); - if (locale == nullptr || std::strcmp(locale, "C") == 0) - { - setlocale(LC_ALL, "en_US.utf8"); - } + // Force a uniform UTF-8 locale for ourselves & our children. + ::setenv("LC_ALL", "en_US.UTF-8", 1); + setlocale(LC_ALL, "en_US.UTF-8"); if (access(Cache.c_str(), R_OK | W_OK | X_OK) != 0) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits