-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Closed
Copy link
Labels
Milestone
Description
See the discussion in
#49073 (comment)
#49073 (comment)
#49073 (comment)
runtime/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Unix.cs
Lines 25 to 37 in 79ae74f
int loaded = Interop.Globalization.LoadICU(); | |
if (loaded == 0 && !OperatingSystem.IsBrowser()) | |
{ | |
// This can't go into resources, because a resource lookup requires globalization, which requires ICU | |
string message = "Couldn't find a valid ICU package installed on the system. " + | |
"Please install libicu using your package manager and try again. " + | |
"Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. " + | |
"Please see https://aka.ms/dotnet-missing-libicu for more information."; | |
Environment.FailFast(message); | |
} | |
// fallback to Invariant mode if LoadICU failed (Browser). | |
return loaded == 0; |
On Browser, if LoadICU()
fails, we should call Environment.FailFast
just like any other platform. We shouldn't fallback to Invariant mode.