From f1801432abaaa6c6137d62319d855b6a3599e182 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 10 Nov 2018 01:16:22 +0200 Subject: Don't bother setting LC_ALL, LC_CTYPE, and LANG on iOS An iOS app might itself, for testing and debugging purposes, look for LANG in the environment (potentially passed to it by Xcode; the OS does not set such an environment variable). It is confusing if that then gets set during the execution of core code back to a device's default. Change-Id: I9dcf44090aed84b55fd4240bda2562026cd8dacb --- sal/osl/unx/nlsupport.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sal/osl') diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx index 01225e631d82..03a7c1c550ca 100644 --- a/sal/osl/unx/nlsupport.cxx +++ b/sal/osl/unx/nlsupport.cxx @@ -836,9 +836,11 @@ void imp_getProcessLocale( rtl_Locale ** ppLocale ) /* return the locale */ *ppLocale = parse_locale( locale.getStr() ); +#ifndef IOS setenv( "LC_ALL", locale.getStr(), 1); setenv("LC_CTYPE", locale.getStr(), 1 ); setenv("LANG", locale.getStr(), 1 ); +#endif } #else /***************************************************************************** -- cgit