From d8dec390d5e02274c1cb33a12d76c7d298cf26d7 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Sat, 14 Oct 2023 14:22:06 +0200 Subject: [PATCH] use LC_ALL --- oc/od/composer.py | 4 ++-- oc/od/orchestrator.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/oc/od/composer.py b/oc/od/composer.py index f6c3e1f..7d875a8 100755 --- a/oc/od/composer.py +++ b/oc/od/composer.py @@ -539,13 +539,13 @@ def createExecuteEnvironment(authinfo, userinfo, app=None ): # 'LC_MEASUREMENT': lang, # 'LC_IDENTIFICATION': lang, # 'LC_TELEPHONE': lang, - # 'LC_NUMERIC': lang } + # 'LC_NUMERIC': lang, + # 'LC_COLLATE': lang } env.update ( { 'LANGUAGE': language, 'LANG': lang, 'LC_ALL': lang } ) # # add dbussession is set in config file # if oc.od.settings.desktop['usedbussession'] : # env.update( {'OD_DBUS_SESSION_BUS': str(oc.od.settings.desktop['usedbussession']) }) - # # add dbussystem is set in config file # if oc.od.settings.desktop.get('usedbussystem') : # env.update( {'OD_DBUS_SYSTEM_BUS': str(oc.od.settings.desktop['usedbussystem']) } ) diff --git a/oc/od/orchestrator.py b/oc/od/orchestrator.py index 6781324..20a197b 100755 --- a/oc/od/orchestrator.py +++ b/oc/od/orchestrator.py @@ -3893,12 +3893,11 @@ def get_env_for_appinstance(self, myDesktop, app, authinfo, userinfo={}, userarg # update env with cuurent http request user LANG values # read locale language from USER AGENT language = userinfo.get('locale', 'en_US') - lang = language + '.UTF-8' # LC_ALL is the environment variable that overrides all the other localisation settings # (except $LANGUAGE under some circumstances). - env['LANGUAGE']=language - env['LANG']=lang - env['LC_ALL']=lang + env['LANGUAGE'] = language + env['LANG'] = language + '.UTF-8' + env['LC_ALL']= language + '.UTF-8' # add PARENT_ID PARENT_HOSTNAME for ocrun nodejs script env['PARENT_ID']=myDesktop.id