Skip to content

unable to load required ICU Globaliztion data #24800

@GaryZhlei

Description

@GaryZhlei

I am using a C# project combined with Emscripten, and I use the following command to build it into JS and WASM. However, when running, I encounter the following error:
"Unable to load required ICU Globalization data."
After searching online, I tried various methods, but none resolved the issue.
Since I need to support all cultures, I set the following in the project:
<InvariantGlobalization>false</InvariantGlobalization>
Methods tried:
Using --embed-file to embed the corresponding icu.dat into the WASM.
Using -sUSE_ICU=1.

The build command is as follows:

call D:\Tools\emsdk-3.1.23\emsdk_env.bat
rd /s /q NETAOT8.0
rd /s /q obj
dotnet publish JS.csproj /p:NativeLib=Shared -r browser-wasm -c Release /p:TargetArchitecture=wasm /p:PlatformTarget=AnyCPU
/p:NativeDebugSymbols=false /p:MSBuildEnableWorkloadResolver=false /p:EmccExtraArgs=
"D:\.nuget\packages\skiasharp.nativeassets.webassembly\3.116.1\buildTransitive\netstandardl.0\libskiaSharp.a\2.0.23\libskiaSharp.a  -s EXPORTED_RUNTIME_METHODS=""[print,printErr,cwrap,ccall,UTF8ToString,stringToUTF8,lengthBytesUTF8,getValue,setValue]"" --post-js=./output.js
-sTOTAL_STACK=5242880 -sINITIAL_MEMORY=104857600 -sMAXIMUM_MEMORY=2147483648 -sALLOW_MEMORY_GROWTH=1" --self-contained
pause

How can I resolve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions