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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 24 06:39:25 UTC 2020


 wsd/LOOLWSD.cpp |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 2b0ebcd680695302541ba8853352c120014629c3
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Jun 24 13:45:24 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Sep 24 09:38:34 2020 +0300

    The locale dance is unnecessary on iOS
    
    The code does not work on iOS as locales apparently are differently
    named than on Linux.
    
    Besides, we have been able to open files with arbitrary non-ASCII
    names, like 000🇹🇩🇲🇶🍉🥨111.odt, just fine for some time already.
    
    Change-Id: I3f4a342721a7ad22786b8bdb1cd9829087539178
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97020
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6d7a99c80..91822125b 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3669,6 +3669,10 @@ int LOOLWSD::innerMain()
 
     initializeSSL();
 
+#ifndef IOS
+    // We can open files with non-ASCII names just fine on iOS without this, and this code is
+    // heavily Linux-specific anyway.
+
     // Force a uniform UTF-8 locale for ourselves & our children.
     char* locale = std::setlocale(LC_ALL, "C.UTF-8");
     if (!locale)
@@ -3684,6 +3688,7 @@ int LOOLWSD::innerMain()
         LOG_INF("Locale is set to " + std::string(locale));
         ::setenv("LC_ALL", locale, 1);
     }
+#endif
 
 #if !MOBILEAPP
     // We use the same option set for both parent and child loolwsd,


More information about the Libreoffice-commits mailing list