Set environment (LANG, LC_MESSAGE, LC_ALL) before using ICU API. accepted/tizen/unified/20200402.155646 submit/tizen/20200401.004644
authorWoongsuk Cho <ws77.cho@samsung.com>
Tue, 31 Mar 2020 03:38:39 +0000 (12:38 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Wed, 1 Apr 2020 00:37:36 +0000 (09:37 +0900)
commit0714797cc02e465ee9b629d3523eaf539cd3d8c8
treec77f2a185f4a4121549fc7c7a7ee3c67e5228ede
parentf03af56caaa54f41560746cfb7a85deb0b07c800
Set environment (LANG, LC_MESSAGE, LC_ALL) before using ICU API.

In order to operate ICU (used for globalization) normally, "LANG" and "LC_ALL" environment variables must be set before using ICU API.
In case of application running, AppFW set that variable. But when preloading the dll in the candidate process,
those environment variables are not set.
As a result, CultureInfo is incorrectly generated and malfunctions.
For example, uloc_getDefault() returns en_US_POSIX, CultureInfo is set to invariant mode.

Additionally, to apply language setting from native to managed, terminate and recreate candidate process when system language setting is changed.

After applying this patches, launching performance is reduced by 15ms ~ 20ms.
That is because previous .net application is launched in invariant mode.
(In invariant mode, string-related operations are fast.)
NativeLauncher/launcher/dotnet/dotnet_launcher.cc