[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/LOOLWSD.cpp

Michael Meeks michael.meeks at collabora.com
Fri Mar 16 10:40:18 UTC 2018


 wsd/LOOLWSD.cpp |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 3bb885ab369f6850c4fb9baf155b0bd0dc566126
Author: Michael Meeks <michael.meeks at 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 <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at 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)
     {


More information about the Libreoffice-commits mailing list