diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 8df873a5765ea..0d7aad96f5897 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,9 +4,9 @@
https://github.com/dotnet/standard
cfe95a23647c7de1fe1a349343115bd7720d6949
-
+
https://github.com/dotnet/icu
- bf5a3a643815a8a46693d618d08dbc96f353ca9e
+ 797c523dd8d75096319f3591958f703b8d74d04b
diff --git a/eng/Versions.props b/eng/Versions.props
index ae139287cf0b3..d578146bafbea 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -118,7 +118,7 @@
5.0.0-preview.3.20363.5
- 5.0.0-preview.8.20364.1
+ 5.0.0-preview.8.20370.1
9.0.1-alpha.1.20356.1
9.0.1-alpha.1.20356.1
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index 763b369167db5..e7cd12b6a4eaa 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -191,7 +191,8 @@
Include="
$(LibrariesNativeArtifactsPath)dotnet.js;
$(LibrariesNativeArtifactsPath)dotnet.wasm;
- $(LibrariesNativeArtifactsPath)dotnet.timezones.blat;"
+ $(LibrariesNativeArtifactsPath)dotnet.timezones.blat;
+ $(LibrariesNativeArtifactsPath)icudt.dat;"
IsNative="true" />
diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets
index ebefed0e7e960..284ae301d8888 100644
--- a/eng/testing/tests.mobile.targets
+++ b/eng/testing/tests.mobile.targets
@@ -14,7 +14,7 @@
- $HARNESS_RUNNER wasm test --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js -v --output-directory=$XHARNESS_OUT -- --enable-zoneinfo --run WasmTestRunner.dll $(AssemblyName).dll
+ $HARNESS_RUNNER wasm test --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js -v --output-directory=$XHARNESS_OUT -- --run WasmTestRunner.dll $(AssemblyName).dll
@@ -121,10 +121,17 @@
AssemblyFile="$(WasmAppBuilderTasksAssemblyPath)" />
+
+
+
+ $([System.IO.Directory]::GetParent('%(Identity)').Name)
+
+
-
+
+
@@ -140,7 +147,6 @@
-
+ AssemblySearchPaths="@(AssemblySearchPaths)"/>
#include
#include
#include
#include
#include
+#include
#include
#include
#include
@@ -55,6 +57,7 @@
#include "pal_compiler.h"
+#if !defined(STATIC_ICU)
// List of all functions from the ICU libraries that are used in the System.Globalization.Native.so
#define FOR_ALL_UNCONDITIONAL_ICU_FUNCTIONS \
PER_FUNCTION_BLOCK(u_charsToUChars, libicuuc) \
@@ -279,3 +282,5 @@ FOR_ALL_ICU_FUNCTIONS
#define usearch_getMatchedLength(...) usearch_getMatchedLength_ptr(__VA_ARGS__)
#define usearch_last(...) usearch_last_ptr(__VA_ARGS__)
#define usearch_openFromCollator(...) usearch_openFromCollator_ptr(__VA_ARGS__)
+
+#endif // !defined(STATIC_ICU)
diff --git a/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_static.c b/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_static.c
new file mode 100644
index 0000000000000..41a1956a2743c
--- /dev/null
+++ b/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_static.c
@@ -0,0 +1,83 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+#include
+#include
+#include "pal_icushim_internal.h"
+#include "pal_icushim.h"
+#include
+#include
+#include
+#include
+
+static void log_icu_error(const char* name, UErrorCode status)
+{
+ const char * statusText = u_errorName(status);
+ fprintf(stderr, "ICU call %s failed with error #%d '%s'.\n", name, status, statusText);
+}
+
+static void U_CALLCONV icu_trace_data(const void* context, int32_t fnNumber, int32_t level, const char* fmt, va_list args)
+{
+ char buf[1000];
+ utrace_vformat(buf, sizeof(buf), 0, fmt, args);
+ printf("[ICUDT] %s: %s\n", utrace_functionName(fnNumber), buf);
+}
+
+#ifdef __EMSCRIPTEN__
+#include
+
+EMSCRIPTEN_KEEPALIVE int32_t mono_wasm_load_icu_data(void * pData);
+
+EMSCRIPTEN_KEEPALIVE int32_t mono_wasm_load_icu_data(void * pData)
+{
+ UErrorCode status = 0;
+ udata_setCommonData(pData, &status);
+
+ if (U_FAILURE(status)) {
+ log_icu_error("udata_setCommonData", status);
+ return 0;
+ } else {
+ //// Uncomment to enable ICU tracing,
+ //// see https://github.com/unicode-org/icu/blob/master/docs/userguide/icu_data/tracing.md
+ // utrace_setFunctions(0, 0, 0, icu_trace_data);
+ // utrace_setLevel(UTRACE_VERBOSE);
+ return 1;
+ }
+}
+#endif
+
+int32_t GlobalizationNative_LoadICU(void)
+{
+ const char* icudir = getenv("DOTNET_ICU_DIR");
+ if (icudir)
+ u_setDataDirectory(icudir);
+ else
+ ; // default ICU search path behavior will be used, see http://userguide.icu-project.org/icudata
+
+ UErrorCode status = 0;
+ UVersionInfo version;
+ // Request the CLDR version to perform basic ICU initialization and find out
+ // whether it worked.
+ ulocdata_getCLDRVersion(version, &status);
+
+ if (U_FAILURE(status)) {
+ log_icu_error("ulocdata_getCLDRVersion", status);
+ return 0;
+ }
+
+ return 1;
+}
+
+void GlobalizationNative_InitICUFunctions(void* icuuc, void* icuin, const char* version, const char* suffix)
+{
+ // no-op for static
+}
+
+int32_t GlobalizationNative_GetICUVersion(void)
+{
+ UVersionInfo versionInfo;
+ u_getVersion(versionInfo);
+
+ return (versionInfo[0] << 24) + (versionInfo[1] << 16) + (versionInfo[2] << 8) + versionInfo[3];
+}
diff --git a/src/libraries/Native/native-binplace.proj b/src/libraries/Native/native-binplace.proj
index 264a881802f31..f8a558defe35b 100644
--- a/src/libraries/Native/native-binplace.proj
+++ b/src/libraries/Native/native-binplace.proj
@@ -25,6 +25,7 @@
+
diff --git a/src/libraries/System.Globalization.Calendars/tests/TaiwanCalendar/TaiwanCalendarDaysAndMonths.cs b/src/libraries/System.Globalization.Calendars/tests/TaiwanCalendar/TaiwanCalendarDaysAndMonths.cs
index 0f96a592bf508..cb901d27f56a9 100644
--- a/src/libraries/System.Globalization.Calendars/tests/TaiwanCalendar/TaiwanCalendarDaysAndMonths.cs
+++ b/src/libraries/System.Globalization.Calendars/tests/TaiwanCalendar/TaiwanCalendarDaysAndMonths.cs
@@ -9,6 +9,7 @@ namespace System.Globalization.Tests
public class TaiwanCalendarDaysAndMonths
{
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39285", TestPlatforms.Browser)]
public void DayNames_MonthNames()
{
string[] expectedDayNames =
diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoEnglishName.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoEnglishName.cs
index 23c2032c51cd4..fdb6e4b189fce 100644
--- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoEnglishName.cs
+++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoEnglishName.cs
@@ -11,8 +11,18 @@ public class CultureInfoEnglishName
public static IEnumerable