emscripten-core / emscripten-core/emscripten

unable to load required ICU Globaliztion data

Open
#24,800 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

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:
`false`
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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.