[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-4' - 2 commits - debian/changelog loolwsd.spec.in wsd/LOOLWSD.cpp

Andras Timar (via logerrit) logerrit at kemper.freedesktop.org
Sun Jun 21 14:22:14 UTC 2020


 debian/changelog |    6 ++++++
 loolwsd.spec.in  |    2 +-
 wsd/LOOLWSD.cpp  |   16 ++++++++++++++--
 3 files changed, 21 insertions(+), 3 deletions(-)

New commits:
commit d125c715fbdf2c8f4b92df55b8ab1f8452650554
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Jun 21 16:21:50 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Jun 21 16:21:50 2020 +0200

    Bump package version to 4.2.4-6
    
    Change-Id: I3a6fa437db77037af7c6aba16d0c5bf62ae7e434

diff --git a/debian/changelog b/debian/changelog
index ca451348e..31f18c9d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (4.2.4-6) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.4-6
+
+ -- Andras Timar <andras.timar at collabora.com>  Sun, 21 Jun 2020 16:20:00 +0200
+
 loolwsd (4.2.4-5) unstable; urgency=medium
 
   * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.4-5
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 3918d5d1b..ee5b28932 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:           loolwsd%{name_suffix}
 Name:           loolwsd
 %endif
 Version:        @PACKAGE_VERSION@
-Release:        5%{?dist}
+Release:        6%{?dist}
 Vendor:         %{vendor}
 Summary:        LibreOffice Online WebSocket Daemon
 License:        EULA
commit cbdc9a8c9f227e50a8c56f7beb2d417bf616f1f0
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Jun 21 10:49:23 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Jun 21 16:20:28 2020 +0200

    fall back to en_US.UTF-8 if C.UTF-8 does not exist
    
    It turned out that C.UTF-8 is not supported on RH7/CentOS7.
    We started to use C.UTF-8 because it was widely available and we
    could shave off locale data in Ubuntu based docker images and
    AppImage. With this patch we fall back en_US.UTF-8 if C.UTF-8 does
    not exist and add some logging.
    
    Change-Id: Idea0ae885dc8cdd9ef33279bd90eb882a656d75c
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96791
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Aron Budea <aron.budea at collabora.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 5c77a8a12..9a701f262 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3669,8 +3669,20 @@ int LOOLWSD::innerMain()
     initializeSSL();
 
     // Force a uniform UTF-8 locale for ourselves & our children.
-    ::setenv("LC_ALL", "C.UTF-8", 1);
-    setlocale(LC_ALL, "C.UTF-8");
+    char* locale = std::setlocale(LC_ALL, "C.UTF-8");
+    if (!locale)
+    {
+        // rhbz#1590680 - C.UTF-8 is unsupported on RH7
+        LOG_WRN("Could not set locale to C.UTF-8, will try en_US.UTF-8");
+        locale = std::setlocale(LC_ALL, "en_US.UTF-8");
+        if (!locale)
+            LOG_WRN("Could not set locale to en_US.UTF-8. Without UTF-8 support documents with non-ASCII file names cannot be opened.");
+    }
+    if (locale)
+    {
+        LOG_INF("Locale is set to " + std::string(locale));
+        ::setenv("LC_ALL", locale, 1);
+    }
 
 #if !MOBILEAPP
     // We use the same option set for both parent and child loolwsd,


More information about the Libreoffice-commits mailing list