[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 24 11:16:25 UTC 2020


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

New commits:
commit 9077962bfe8466c12bb2475778372c1dc7bf1a0d
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Jun 24 13:45:24 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Jun 24 13:16:05 2020 +0200

    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 96be14b4e..9c713fbde 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3668,6 +3668,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)
@@ -3683,6 +3687,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